Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying Solid gauge #192

Open
nvipinkumar opened this issue May 26, 2015 · 2 comments
Open

Displaying Solid gauge #192

nvipinkumar opened this issue May 26, 2015 · 2 comments

Comments

@nvipinkumar
Copy link

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!

@ghost
Copy link

ghost commented May 26, 2016

I had the same issue. Is there any kind of resolution or work around?

@nofxx
Copy link

nofxx commented Jan 25, 2017

Same issue. But here the moving part of the graph stays still on 50%....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants