Formatting Y-axis on JFreeChart

泄露秘密 提交于 2019-12-02 02:13:57
trashgod

The static factory createStackedAreaChart() instatiates a NumberAxis for the range. The NumberAxis method createStandardTickUnits() creates the standard tick units, which may serve as an example for creating your own units. In particular, "If you don't like these defaults, create your own instance of TickUnits and then pass it to the setStandardTickUnits() method." There's more details here.

I would of done a byte conversion, converting from

KB to MB=(KB/1024)
KB to TB=(KB/(1024*2))
KB to GB=(KB/(1024*3))
KB to PB=(KB/(1024*4))

Where the the NumberAxis should auto range depending on the value passed.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!