Hi Alan,

On Wed, Dec  3, 2025 at 18:46 (-0000), [email protected] wrote:

> Hello list, how can I modify my code to add the percentage symbol (%) to the 
> number?

> \startTEXpage
>   \startMPcode
> draw lmt_chart_circle [
> samples = { { 80, 20 } },
> percentage = true,
> trace = false,
> labelcolor = "white",
>   % labelformat = "@0.1f"
>   ] ;
>   \stopMPcode
> \stopTEXpage

Here is one way

\startTEXpage
  \startMPcode
  draw lmt_chart_circle [
  samples = { { 80, 20 } },
  percentage = true,
  trace = false,
  labelcolor = "white",
  labelformat = "@0.1f\char37"
  ] ;
  \stopMPcode
\stopTEXpage

Probably there are nicer ways.

(37 is %'s ASCII code.)

Cheers.
                                Jim

> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the 
> Wiki!

> maillist : [email protected] / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to