I'm looking for a way to draw a horizontal line at a given ordinate value. Something like a custom tick on the Y axis, but with a custom line shape and label (nothing very complicated, just need to set the line width and color, and to have a plain line rather than dashed)
I don't want to work around this with a XYSeries with 2 points at the same Y value, because the line needs to be infinite.
Therefore I thought of a custom axis tick, but couldn't find an easy way to do it. Is there any ?
Thank you everyone in advance,
Christophe
Drawing a horizontal line in a plot
Re: Drawing a horizontal line in a plot
You don't need to put the values into your dataset. Just use the addRangeMarker(...) method in the plot.
Regards,
Dave Gilbert
Regards,
Dave Gilbert
Re: Drawing a horizontal line in a plot
Thanks you a lot. Just a little precision please, what does the "paint" parameter refer to in the constructor :
public Marker(double value, Paint outlinePaint, Stroke outlineStroke, Paint paint, float alpha)
I understand the outlinePaint is for the color of the line, but the "paint" ?
public Marker(double value, Paint outlinePaint, Stroke outlineStroke, Paint paint, float alpha)
I understand the outlinePaint is for the color of the line, but the "paint" ?
Re: Drawing a horizontal line in a plot
I don't know the exact definition, but if you draw a line on a 3-D graph, it will be the color of the surface (or the 'filled in' color if you prefer).