michelson / lazy_high_charts

Make highcharts a la ruby , works in rails 5.X / 4.X / 3.X, and other ruby web frameworks
http://www.suipit.com
MIT License
1.05k stars 242 forks source link

pointPlacement - single column #227

Closed duyetvn closed 7 years ago

duyetvn commented 7 years ago

I'm using this gem and I meet a problem like pointPlacement - single column which was happened and fixed on hightchart. When I using the same data with hightchart native, It works but not work fine with this gem. Anyone help me?

My chart works fine when use hightchart native: http://jsfiddle.net/duyetvn/rcwuey9k/1/

But not work when use this gem. My code:

@graph = LazyHighCharts::HighChart.new do |f|
      f.chart({type: "columnrange", inverted: true})
      f.title(text: "Plan - Progress rate")
      f.subtitle(text: "Example")
      f.xAxis(categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])
      f.yAxis(
        title: {
                text: 'Temperature ( °C )'
            }
      )
      f.series({
            name: 'Temperatures',
            pointPlacement: -0.15,
            data: [
                [-9.7, 9.4]
            ]
        }
      )
      f.series({
            name: 'TEST',
            pointPlacement: 0.15,
            data: [
                [0, 5]
            ]
        }
      )

      f.legend(enabled: false)
    end

It displays like pintplacement

duyetvn commented 7 years ago

I found problem is this gem still not update highcharts lib to latest versions. Waiting for updating.