Re: labels in charts?

Dr. T.C. Zhao (
Sat, 15 Feb 1997 19:16:29 -0600

To subscribers of the xforms list from "Dr. T.C. Zhao" <> :

From: "Stephen Langer" <>
> I'm trying to label points on an FL_LINE_CHART. Actually, I just want to
>highlight one particular point, so I used
> fl_add_chart_value(obj, val, "@square", FL_BLACK);
>This works, but the square is drawn up above the line. Since there seems
>to be no way to control the position of the square, I thought I'd just
>replace it with a downward arrow, "@2->". This showed up as a tiny
>almost invisible mark. Then I tried a circle, "@circle", which didn't
>show up at all!

I must say this is the most interesting and innovative
way of utilizing the symbols I've seen, unfortunately
chart object is not prepared for this: in drawing
the labels, chart object uses a lazy alignment by
setting the size of the bounding box to zero
fl_drw_text_beside(FL_ALIGN_TOP, x, y, 0, 0, ....)
which should really be
fl_drw_text_beside(FL_ALIGN_TOP, x - bbox_w/2, y, bbox_w, bbox_h, ....)
it makes no difference for textual labels, but it matters
for symbols.

I've fixed this. While doing this, I also added
fl_set_chart_l{size|style|colr} to manipulate the
item label attributes.

To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: