2

Does anyone know how to make JustGage object responsive ? Please Check the link below, I fix the issue with raphael but can't get do the same with 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/

4

1 回答 1

5

只需添加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/

于 2014-03-14T21:46:10.130 回答