> I'm working on a chartMaker and I need help or ideas to figure label
> positioning on the arc sections in the pie chart. The thing already has a
> legend, but the sections themselves needs labelling. (Using the grc label
> property has not helped as it it positioned relative to the entire bounding
> rectangle)
>
> Aaarggh! Pretty please... Sanity is becoming a vague memory and _someone_
> must have run into this before!
>
> Obvious is good. I like obvious. Tell me the obvious!
>

  I made this function in order to position a label inside an arc section,
making it the most visible possible, whatever the arcangle value is.

  If you have a circle (graphic) named �cercle_mycircle�  and a field named
�T_mycircle�

  place_val_dans_cercle �mycircle�


on place_val_dans_cercle quoi

  put "cercle_" & quoi into nom_cercle
  put (the width of cd graphic nom_cercle)/2  into rayon
  put the startangle of cd graphic nom_cercle into debut
  put the arcangle of cd graphic nom_cercle into taille
  put taille/2 into teta
  put debut + (teta) into fi
  put (fi*pi)/180 into fi_radian
  put (teta*pi)/180 into teta_radian
  put (rayon*cos(fi_radian))/(1+sin(teta_radian)) into x
  put (rayon*sin(fi_radian))/(1+sin(teta_radian)) into y

  put the loc of cd graphic nom_cercle into coo
  put item 1 of coo + x into item 1 of coo
  put item 2 of coo - y into item 2 of coo

  put "T_" & quoi & "_val" into champ
  set the loc of cd field champ to coo

end place_val_dans_cercle

  I hope this function will help you.

   Best regards

Herve Proudhon

This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm

Reply via email to