2

I would like to customize my PolarChart to replace the angle values displayed in a PolarChart by default enter image description here , with custom strings like this : enter image description here

Kowlown
  • 659
  • 7
  • 24

1 Answers1

2

You can override the refreshAngleTicks() method of PolarPlot, as shown here:

import static org.jfree.ui.TextAnchor.*
…
PolarPlot plot = new PolarPlot() {

    @Override
    protected List refreshAngleTicks() {
        List ticks = new ArrayList();
        ticks.add(new NumberTick(0, "maxCharTick: 20", TOP_LEFT, TOP_LEFT, 0));
        ticks.add(new NumberTick(45, "energyComsuption: 1", TOP_LEFT, TOP_LEFT, 0));
        ticks.add(new NumberTick(90, "maxDamage: 40", TOP_LEFT, TOP_LEFT, 0));
        …
        return ticks;
    }
};

Alternatively, consider a SpiderWebPlot, shown here.

Community
  • 1
  • 1
trashgod
  • 200,320
  • 28
  • 229
  • 974