Reporting Module: Time Series X-Axis Formatting

Continuing the discussion from Reporting Module: Chart X-Axis Formatting:

I have the same concern/requirement as jimmyloo did in this previous post. I have seen quite a few requests for help on this topic in my search of the forums, but I haven’t seen much response. Is this an issue that is elephant in the corner of the room, or have people just figured it out on their own and I will have to do the same? Thanks for any help that you may be able to provide.

I need a time series chart to look as posted below, reference from jimmyloo’s post.


You will need to use the configureChart function on the xy chart to override it’s behavior. How to do that is something that we don’t document (because the sky is the limit, and because it’s basically an “off the shelf” component), although there are definitely examples available on the forum. The chart object you get in the configureChart function is an instance of the JFreeChart class; their javadoc API reference is your best explanation of what to do.

Without actually writing out the script, but based on previous exploration, you will need to call chart.getXYPlot(), then from the plot call getDomainAxis(), then on the axis (which should be a DateAxis) call setTickUnit(<tickUnit>).

1 Like

Thank you very much for your prompt response. I will chase down those leads. I should be able to use your information to make more educated searches.

Have a look at this topic. There is a little code sample that may help you.

Thank you, I will check it out.