I am facing a problem when I use segmented timeline for a timeseries and set the renderer as XYBarRenderer. The bars that are rendered are fine for the fist few points (and correctly skip the excluded dates), but then subsequently some of the bars are displayed with near-zero width (almost just a thin line) instead of a bar. Infact whatz surprising is that, the zero width bars occur arbitrarily somewhere in the time series. I read in one of David Gilbert's posts that the width of the bars are set based on the range of data (equally divided among the bars) and I also recall reading that segmented timeline mayhave problems, including number rounding issues. Can anybody please point me to the code where the calculation of the width of each Rectangle2D shape object is done, so that I can step through the code and try to fix it ? (I tried, but could not find it though)
Or if there is any alternate fix that could be used, that would be great. I can also post an example that produces the problem
As a temporary solution, I tried to override the renderer with a custom renderer and tried to display just a line instead of a bar. Can you please let me know which method do I need to override if I use the XYLineAndShapeRenderer and set the lines as false and use the shape option as a line
Thanks,
Harsha
SegmentedTimeLine and XYBarRenderer
The width of the bar plotted by XYBarRenderer is determined by calling these IntervalXYDataset methods:
Code: Select all
getStartYValue();
getEndYValue();
-
- Posts: 12
- Joined: Fri Jan 06, 2006 1:36 am
Then I'll have to use the IntervalXYDataset instead of the TimeSeriesCollection which automatically determines the width of the bars, don't I ? Thats maybe too much of a change for me and I would prefer to either get some help to fix the bug or render all of them as lines..any pointers on either of them ?
Thanks
Thanks