JFreeChart using Large Numbers as Values

后端 未结 1 702
粉色の甜心
粉色の甜心 2020-12-21 11:28

I am currently working on a project using JFreeChart. I got everything working except when I start using large numbers, it goes all funny.

    DefaultCategor         


        
相关标签:
1条回答
  • 2020-12-21 11:33

    You can use setNumberFormatOverride() and pass in a suitable NumberFormat. Hover over any bar to see the exact value in a tool tip.

    NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    NumberFormat formatter = NumberFormat.getIntegerInstance();
    rangeAxis.setNumberFormatOverride(formatter);
    

    0 讨论(0)
提交回复
热议问题