Auto Tick With Formatting
Auto Tick With Formatting
Is it possible to set the tick format, say to $##,###,##0, and yet maintain the auto-tick-unit selection so that the axis is automatically scaled? We are generating charts on the fly for costs of a service that the user selects and maximum cost varies considerably between services. Thanks for any help. JS
Re: Auto Tick With Formatting
Hi Joe,
Sorry for the delayed response. In the next release of JFreeChart, there will be a method you can use to specify an "override" format that will be applied to whichever tick unit is selected for the axis.
Until then, the best workaround is to create your own TickUnits collection and register it with the setStandardTickUnits(...) method in the ValueAxis class. You can add any number of TickUnit objects to the TickUnits collection (see the createStandardTickUnits() method in the NumberAxis class for one example).
Regards,
DG
Sorry for the delayed response. In the next release of JFreeChart, there will be a method you can use to specify an "override" format that will be applied to whichever tick unit is selected for the axis.
Until then, the best workaround is to create your own TickUnits collection and register it with the setStandardTickUnits(...) method in the ValueAxis class. You can add any number of TickUnit objects to the TickUnits collection (see the createStandardTickUnits() method in the NumberAxis class for one example).
Regards,
DG