A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
indio
- Posts: 17
- Joined: Thu Mar 27, 2008 4:14 pm
Post
by indio » Mon Apr 21, 2008 9:29 am
I have a situation where we poll the sate of a certain variable at regular intervals. The variable is a string and it can be at 4 different states. I need to plot the fluctuations of this string variable in a timeseries graph.
Code: Select all
A-|
B-| --------
C-|------ ---------
D-|
|----------|------------|--------
11-apr 12-apr 13-apr
This is what I mean. Right now we give the string values a number, and then the title explains which number means which string. Is there a better way to do this?
-
david.gilbert
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
-
Contact:
Post
by david.gilbert » Mon Apr 21, 2008 11:08 am
You can use a SymbolAxis for the y-axis.
-
indio
- Posts: 17
- Joined: Thu Mar 27, 2008 4:14 pm
Post
by indio » Tue May 20, 2008 10:57 am
Hello David,
I followed your advice on the Symbol axis and it worked very well.
A problem arises when the symbols (strings) are longer than the margin between the axis and the end of the image. The strings get left-cropped, and you can see only the end of each Symbol.
Of course the correct behavior would be to be able to see the start of the symbol and end cropped. Is there any way we can achieve that?
-
david.gilbert
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
-
Contact:
Post
by david.gilbert » Tue May 20, 2008 10:20 pm
Can you post a small self-contained demo that reproduces the problem? I tried but couldn't reproduce the effect you described.