Why does my pie and column chart display line charts?

Why does my pie and column chart display line charts?

I have configured a chart with both column and pie chart types using the SeriesPie and SeriesColumn classes as below, why does the chart display both types as line charts? After all I have specified SeriesPie and SeriesColumn.

SeriesPie seriesPie = new SeriesPie();
...options...
chartOptions.getSeries().add(seriesPie);

SeriesColumn seriesColumn = new SeriesColumn ();
...options...
chartOptions.getSeries().add(seriesColumn );



Even though you have used the SeriesPie and SeriesColumn classes you must still set the chart types as shown below.
Otherwise they will default to Line. This is true for all chart types.

SeriesPie seriesPie = new SeriesPie();
seriesPie.setType(SeriesType.PIE);
...options...
chartOptions.getSeries().add(seriesPie);

SeriesColumn seriesColumn = new SeriesColumn ();
seriesColumn.setType(SeriesType.COLUMN);
...options...
chartOptions.getSeries().add(seriesColumn );



For the usual case of a chart with only 1 type you would specify the type using the chart.type option.

chartOptions.getChart().setType(ChartType.COLUMN);

The Java API’s are up to date with the latest version of Highcharts and Highstock. They fully supports all chart types and chart options in Highcharts v5.x, v6.x, v7.x, v8.x and Highstock v8.x.

Current versions supported are:

HyJavaCharts

HyJavaStock