0

I am working in polar chart using the jfree library in java. I need show the "Radius tick mark" in the polar chart. I have previously worked in jfree line chart but I am new in polar chart.

I need to get it like this:

Image of the chart

Community
  • 1
  • 1
  • 3
    Welcome to SO! Can you provide the code you tried ? What happened? Might be easier to help with a working stackblitz , as a rule of thumb always give more details and source code when looking for help. – Tiago Silva Sep 06 '19 at 07:47
  • Possible [duplicate](https://stackoverflow.com/a/2430561/230513). – trashgod Sep 06 '19 at 23:47

1 Answers1

1

As shown here, a PolarPlot is typically created with a radial Axis. While the tick labels on the axis are visible by default, ChartFactory.createPolarChart() disables them:

rangeAxis.setTickMarksVisible(false);

If you have created your chart using the factory, simply enable the tick marks:

PolarPlot plot = (PolarPlot) chart.getPlot();
ValueAxis axis = plot.getAxis();
axis.setTickLabelsVisible(true);

Alternatively, create the plot yourself, as shown here, and leave the tick labels enabled:

ValueAxis radiusAxis = new NumberAxis();
…
PolarPlot plot = new PolarPlot(dataset, radiusAxis, renderer);

polar plot with radial tick labels

trashgod
  • 203,806
  • 29
  • 246
  • 1,045