I want to annotate my population growth chart by placing event names on the time axis.
What would be a right way to do it?
Thank you.
Time axis annotations
-
- Posts: 4
- Joined: Fri Sep 11, 2015 2:23 pm
- antibot: No, of course not.
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Time axis annotations
Have you looked at the ValueMarker class?
-
- Posts: 4
- Joined: Fri Sep 11, 2015 2:23 pm
- antibot: No, of course not.
Re: Time axis annotations
Yes, and I somehow overlooked the setLabel(String) method.
Thank you.
Thank you.
-
- Posts: 4
- Joined: Fri Sep 11, 2015 2:23 pm
- antibot: No, of course not.
Re: Time axis annotations
Err, I'm looking at it again and can't find it, and neither in the source code.
Just to be sure, the following image illustrates what I'm trying to achieve:
Would it be possible to add another date axis to the plot and make it render labels on the other side?
Just to be sure, the following image illustrates what I'm trying to achieve:
Would it be possible to add another date axis to the plot and make it render labels on the other side?
-
- Posts: 45
- Joined: Thu Jun 26, 2014 8:24 am
- antibot: No, of course not.
- Location: Germany, Aachen
Re: Time axis annotations
And how far have you been? So just the labeling is missing?
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Time axis annotations
Markers do not support rotated text, nor do they support the marking of a value in form of a shape. Adding these functions will not be trivial, as markers do not have a dedicated draw-method that could be overriden, but are drawn by the renderers,
Please have a look at the annotation classes presented in this thread.
Please have a look at the annotation classes presented in this thread.
-
- Posts: 4
- Joined: Fri Sep 11, 2015 2:23 pm
- antibot: No, of course not.
Re: Time axis annotations
@paradoxoff
Thank you. Annotations was definitely a way to go. I'm still a bit puzzled with setLabel(String) method in ValueMarker class. Latest version of the API docs doesn't have it, but I'm pretty positive I saw it someplace. Anyway, simple XYTextAnnotation did it for me, and, while I didn't need it for the task at hand, overriding paint method to make it draw dots or whatever on the range axis shouldn't be very difficult.
Thank you. Annotations was definitely a way to go. I'm still a bit puzzled with setLabel(String) method in ValueMarker class. Latest version of the API docs doesn't have it, but I'm pretty positive I saw it someplace. Anyway, simple XYTextAnnotation did it for me, and, while I didn't need it for the task at hand, overriding paint method to make it draw dots or whatever on the range axis shouldn't be very difficult.
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Time axis annotations
You probably saw that in the Marker class.cabarete_cub wrote:I'm still a bit puzzled with setLabel(String) method in ValueMarker class. Latest version of the API docs doesn't have it, but I'm pretty positive I saw it someplace.