gzsoham Posted April 21, 2010 Share Posted April 21, 2010 n time series chart, where time period is 'day', if the min and the max dates in the horizontal axis is not further apart same day is printed (different time). Let me explain, say the min and max dates are 20 Apr 2010 and 21 Apr 2010. So the horizontal axis prints 20 Apr 00:00, 20 Apr 04:00, 20 Apr 08:00, ......, 21 Apr 00:00. I don't want to print 20 Apr twice. Actutally my 'time axis tick label mask' is set to 'dd-MMM-yy'. Hence the horizontal axis has no time info and it looks odd. Please see attachment. How can I make sure the same day is not repeated? Link to comment Share on other sites More sharing options...
lucianc Posted April 27, 2010 Share Posted April 27, 2010 Use HH:mm as mask and print the date as title or in another location. Having the date printed only for the first tick would require customizing JFreeChart as I don't think there's built-in support for something like that.Regards,Lucian Link to comment Share on other sites More sharing options...
gzsoham Posted April 29, 2010 Author Share Posted April 29, 2010 Hi Lucian,I need to print the date in the x-axis in the format 'dd-MMM-yy'. So I guess, as you suggested, I need to customize JFreeChart. How can one do that? Do you have an example? Thanks,Soham Link to comment Share on other sites More sharing options...
lucianc Posted May 4, 2010 Share Posted May 4, 2010 I don't have an example. Get the JFreeChart sources, find the place where tick labels are generated and change the code to do what you want.Regards,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now