Menu

Bar series are displayed as Column series

Eliuth
2016-10-03
2016-11-15
  • Eliuth

    Eliuth - 2016-10-03

    Hi,

    I'm facing this bug when firstly chart widget is added into RootPanel and then series is added into chart.

    Here's the code to reproduce the bug:

            BaseChart chart = new Chart();
            Series series = chart.createSeries().setType(Series.Type.BAR);
    
            series.addPoint(0, 5);
            series.addPoint(1, 8);
            series.addPoint(2, 4);
            series.addPoint(3, 7);
            series.addPoint(4, 9);
    
            // Add chart widget into Root Panel.
            RootPanel.get().add(chart);
    
            // Now add series into chart.
            chart.addSeries(series);
    

    I'm using higchart.js 5.0.0 and GWT Higcharts 1.7.

    Thanks,
    Eliuth

     
  • Shawn Quinn

    Shawn Quinn - 2016-11-15

    I'm not sure why this would be needed, but in case you're still having trouble with this: can you try instead setting the default type directly on the chart before creating the series? E.g.

            Chart chart = new Chart()
                .setType(Series.Type.BAR);
            Series series = chart.createSeries();
            ...
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.