I am trying to make something like excel databars in context TABLE enviroment. I have created overlay, that should draw the databar, but I can't figure out, how to pass data into that overlay.
Is it possible to make something like
\defineoverlay[demo circle #1][\useMPgraphic{demo circle}{color=#1}]
??? or is there any other way, how to draw cell background of TBALE (\bTD) by Metapost and pass in data, that will be accessible by \MPvar?
minimal working example:
\mainlanguage[cz]
\setuppapersize[A4][A4]
\setuplayout[topspace=2cm,backspace=2cm,width=middle,height=middle,header=0.6cm,footer=0.7cm,footerdistance=0.2cm,headerdistance=0.2cm]
\setupcolors[state=start]
\startuseMPgraphic{demo circle}
path p ;
p := fullcircle xscaled \overlaywidth yscaled \overlayheight ;
fill p withcolor .85white ;
draw p withpen pencircle scaled 2pt withcolor \MPvar{color} ;
\stopuseMPgraphic
\defineoverlay[demo circle #1][\useMPgraphic{demo circle}{color=#1}]
\starttext
\placetable{Test}{\bTABLE
\bTR \bTD[background=demo circle blue] aaaaa \eTD \bTD[background=demo circle red] bbbbb \eTD \eTR
\bTR \bTD[background=demo circle green] cccccc \eTD \bTD[background=demo circle black] dddddd \eTD \eTR
\eTABLE}
\stoptext
\documentclass{...}
and ending with\end{document}
.\documentclass{...}
...\end{document}
.