Categories with less data is hidden in Vaadin Chart

Hi,

I have a Vaadin Basic Bar Chart. One of the categories has less data compared to other categories. So, the one with the less data is nearly hidden. Is there any way to show the data for that category as well by altering the x-axis values or is there a way to customize the x-axis values so that they are not in even intervals?

Thanks in advance.

Hi,

You can have multiple axis in your chart and then configure the different data series to use that the secondary axis:

YAxis secondaryAxis = new YAxis(); chart.getConfiguration().addyAxis(secondaryAxis); dataSeries.setyAxis(secondaryAxis); Or you could try using logaritmic axis:

chart.getConfiguration().getyAxis().setType(AxisType.LOGARITHMIC);

cheers,
matti

Used Logarithmic Axis. Worked great. Thanks.

Is there a similar solution for Pie Chart ?

I think logaritmic axis for Pie would make the visualization pretty much useless. If you have lots of slices that are very small, I’d group them and present their relative sizes in a separate pie (if it matters). If just one which is very small, then just add those labels with line from the slice to show the actual value.

cheers,
matti