我在同一页面上使用了两个不同的图表,所以当我点击其中任何一个图表时,仪表图表就会消失。
var gauge1 = new RGraph.Gauge({
id: 'gauge',
min:0,
max: 100,
value: #{mbCardHistory.creditCardPrecentage},
options: {
centery: 120,
radius: 130,
anglesStart: RGraph.PI,
anglesEnd: RGraph.TWOPI,
needleSize: 85,
borderWidth: 0,
shadow: false,
needleType: 'line',
colorsRanges: [[0,30,'red'], [30,70,'yellow'],[70,100,'#0f0']],
borderInner: 'rgba(0,0,0,0)',
borderOuter: 'rgba(0,0,0,0)',
borderOutline: 'rgba(0,0,0,0)',
centerpinColor: 'rgba(0,0,0,0)',
centerpinRadius: 0,
textAccessible: true
}
}).draw();