1

I have recently implemented a JFreeChart library in my program, but I struggle to change some of the colors of the text, so I can use it in my dark theme. The screenshot below highlights the labels I was not able to figure out how to change the color of.

I am using java swing library with the latest version of JFreeChart and JCommon

If there is any way of changing those colors to some brighter colors, I would be really glad.

Thanks everybody for their answers, I really appreciate any kind of help with this problem. This is the image showing which parts of the chart I want to change the color of the text.

  • 1
    Welcome to Stack Overflow .. Just see this answer : https://stackoverflow.com/a/2504993/14945696 – Kevin M. Mansour Apr 08 '21 at 19:14
  • No way :O Thank you so much, I am really grateful for this answer, couldn't find the post in the link for some reason, but it solved my issue. You saved my day, thank you very much! Can you post this as an answer so I can mark it as answered? Thank you – Just Bucket Apr 08 '21 at 19:42
  • I am really happy for helping you .. Wish you a Great Day :) – Kevin M. Mansour Apr 08 '21 at 19:46

1 Answers1

1

Try setTickLabelPaint() on the Axis that you want.

See all Changing color of labels in JFreeChart.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
Kevin M. Mansour
  • 2,915
  • 6
  • 18
  • 35