Hello,
I am using a TimeSeriesChart. The sampling period of my data is eighth a second. And so I would like my domainAxis to be sampled each eighth a second.
For example, when I use timeAxis.java2DToValue(), I want to get an eighth a second x value and not a millisecond x value.
I thank about some possibilities :
- to define a new RegularTimePeriod called EighthASecond, it looks very complicated
- to use SegmentedTimeLine, but I really don't if it could resolved my problem cause I have never used it
- to do a DomainLockedOnData after the java2DToValue(), this solution is not very proper for me, and it looks very slow. I have to call java2DToValue() very often.
Thank you for any reply.
EighthASecond sampling period for TimeSeriesChart.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Why don't you just round the millisecond value to the nearest 1/8th of a second?
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Oh, yes sure. I have not thunk to this solution.
I have done that by this way.
Thank youy for your reply.
I have done that by this way.
Code: Select all
x = Math.round( x / 125 ) * 125;