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 fully support all chart types and chart options in Highcharts v5.x, v6.x, v7.x, v8.x, v9.x;  Highcharts Stock v8.x, v9.x and ApexCharts v3.x.


Current versions supported are:

HyJavaCharts

HyJavaStock

HyJavaApex

Start the HyJavaCharts demo Java web application


Start the HyJavaStock demo Java web application


Start the HyJavaApex demo Java web application


Start the HyJavaImages demo Java web application