The pie chart is the default setting in the chart macro.
The pie chart code can be fairly simple to more complex depending on your needs.
As seen at the Generate a chart page the simple code:
produces this pie chart:
Two things to notice:
- In this line
|| ||Quicksand||Alligators||
, there is a space between the first pair of bars ||
and the second pair ||
. This space is absolutely necessary. It serves as the place where you would practice good programming protocols and say what the line of code you are typing represents, in this case the types of traps. It also serves to keep your columns aligned correctly so that the chart macro pairs the labels (Quicksand, Alligators) with the correct numerical data (3 and 4 respectively). It might be better to type the line as || Traps || Quicksand || Alligators||
- In the next line
|# affected|3|4|
, you are again using good protocols, defining what the numbers stand for, in this case the number of each kind of trap. You could of course simply typed it as | |3|4|
, making sure you put a space between the first two bars.
If you do not format correctly, your pie chart will not generate correctly. Unfortunately the Notation Help Guide does not give complete examples.
You should practice making a pie chart. Use a different number of items.
Click on the Pie Charts with Data Labels to go on to a more complex example.