Dear all,
Here is my issue: I need to draw a stepped chart, but with the step being drawn before the point defined.
For example if I have the following serie:
(1,100),(2,50),(3,70),...
I would need to have a step at "100" between 0 and 1, a step at 50 between 1 and 2, etc...
I did not find a way to do it with the current API.
Is there something I missed? Is there a way to implement it?
Just another point I'd like to stress out: I cannot just translate all points to the ont before, as I need to show the actual value when the user clicks on the point (in my example, when I point on "2", I want to show "50"
Thank you in advance for your help and advice
stepped chart with the step before the point
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
When this code was originally submitted, I wondered if someone would want the steps to go the other way around. What you'll need to do is modify the lines drawn by the drawItem() method in the XYStepRenderer class.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Thank you for the answer, that's what I was suspecting.
For the implementation, I found someone that posted this suggestion, which I'm going to try:
http://www.jfree.org/phpBB2/viewtopic.p ... light=step
Indeed it is sometimes necessary to show the steps the other way than the usual...
For the implementation, I found someone that posted this suggestion, which I'm going to try:
http://www.jfree.org/phpBB2/viewtopic.p ... light=step
Indeed it is sometimes necessary to show the steps the other way than the usual...