09.07.2015 Views

piechartMP Manual

piechartMP Manual

piechartMP Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3 <strong>piechartMP</strong> SetupSetupValue( this, " million \EUR")SetupName(PreString,PostString)PreString [Type: string] a string attached before the string of the segment name"" empty string; default"?????" any stringthis the current valuePostString [Type: string] a string attached after the string of the segment name"" empty string; default"?????" any stringthis the current value3.4.2 Label and Text Setup ExamplesIn both examples a T E X or more concrete L A T E X input file will be used. This file has thefollowing contents, its name is for example timessym.tex. The purpose of the \Ordmacro is to typeset correct ordinal numbers.\usepackage{times}\usepackage{marvosym}\newcommand*{\Ord}[1]{%\ifcase #1\relax%#1\textsuperscript{th}%\or%#1\textsuperscript{st}%\or%#1\textsuperscript{nd}%\or%#1\textsuperscript{rd}%\else%#1\textsuperscript{th}%\fi}A Basic Chart As usual, in the METAPOST input file first the <strong>piechartMP</strong> module isloaded. The font for text in text mode 0 is set by assigning the name of the Times-BoldItalic metric-file to the METAPOST variable defaultfont. Next the precision of thepercent values is set to 1 and the decimal delimiter to ,, which is more useful for germanpeople. The fourth statement appends the % symbol on the percent value, since the unitshould be displayed too. As you will see the percent values will be typeset in text mode 0,thus a real % symbol is used and not the T E X command \%.input piechartmp;defaultfont := "ptmbi8r" ;SetupNumbers(1, ",") ;SetupPercent(this, " %") ;20

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!