有谁知道如何使JustGage对象响应?
请检查下面的链接,我修复了raphael的问题,但使用JustGage无法做到这一点:

window.onload = function () {
  var g1 = new JustGage({
    id: "g1",
    value: getRandomInt(0, 4000),
    min: 0,
    max: 4000,
    title: "Well over thousand",
    label: ""
  });
}

http://jsfiddle.net/ugFmE/

最佳答案

只需将relativeGaugeSize: true添加到您的代码中

无需固定高度

#g1 {
    /* width: 400px; */
    /* height:300px; */
}

脚本
var g1 = new JustGage({
  id: "g1",
  value: getRandomInt(0, 4000),
  min: 0,
  max: 4000,
  title: "Well over thousand",
  label: "",
  relativeGaugeSize: true
});

http://jsfiddle.net/ugFmE/10/

09-19 22:15