You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to Ruby and was able to use this gem to display bar graphs, pie charts and donut chart. However, I tried to mimic the code at [1] and display a solid gauge. The code did not give me any error but at the same time it did not display any gauge. Could you please tell me if the gauge graph is supported by the gem and what could be the issue with my code below:
Hi
I am new to Ruby and was able to use this gem to display bar graphs, pie charts and donut chart. However, I tried to mimic the code at [1] and display a solid gauge. The code did not give me any error but at the same time it did not display any gauge. Could you please tell me if the gauge graph is supported by the gem and what could be the issue with my code below:
@CharT7 = LazyHighCharts::HighChart.new('solidgauge') do |f|
f.chart({:backgroundColor=>"#FFFFFF", :defaultSeriesType=>"solidgauge" , :margin=> [0, 0, 0, 0]} )
f.pane({
:center=>['50%', '85%'],
:size=>'140%',
:startAngle=> -90,
:endAngle=> 90,
:background=> {
:backgroundColor =>"#FFFFFF",
:innerRadius=> '60%',
:outerRadius=> '100%',
:shape=> 'arc'
}
})
f.tooltip({
enabled: false
})
f.yAxis({
:min=>0,
:max=>200,
:title=>{
:text=>'Speed'
},
:stops=> [
[0.1, '#55BF3B'],
[0.5, '#DDDF0D'],
[0.9, '#DF5353']
],
:lineWidth=>0,
:minorTickInterval=>'null',
:tickPixelInterval=>400,
:tickWidth=> 0,
:title=>{
:y=>-70
},
:labels=>{
:y=>16
}
})
f.plotOptions({
:solidgauge=>{
:dataLabels=>{
:y=>5,
:borderWidth=>0,
:useHTML=>true
}
}
})
series = {
:name=>'Speed',
:data=>[80],
:tooltip=>{
:valueSuffix=>' km/h'
}
}
f.series(series)
end
[1] - http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/gauge-solid/
Thanks a lot for this wonderful gem!
The text was updated successfully, but these errors were encountered: