Warning (!)

Wiki Cloud Migration Deadline


On January 8th, 2024 the University of Iowa Wiki hosted at https://wiki.uiowa.edu will be shut down permanently. If you would like to continue using Confluence (Wiki) in the Cloud, you will need to request licenses by filling out this Workflow form if you haven't done so already.

For more information and other options for your content, please visit the Wiki Service Change Options and FAQs page. Your content from https://wiki.uiowa.edu will be available for migration upon request for two years (until 1/8/2026).

Child pages
  • Pie Charts with Data Labels

If you type in the following in the Wiki Markup editor:

{chart:type=pie|title=Fish Sold 2004 | pieSectionLabel = %0% = %1%}
|| ||Herring||Salmon||Tuna||Snapper||
|# caught|9500|2900|1500|500|

you will get:

Things to notice:

  1. In the first line if defined the chart type as pie by coding (chart:type=pie) despite the fact that the pie chart is the default. This is just good coding practice. And it serves to remind you what you are trying to create as you read through the editor.
  2. You use the bar (|) to separate commands in your command line (chart:type=pie|title=Fish Sold 2004 | pieSectionLabel = %0% = %1%).
    There are three commands in this line.
    1. Use the chart macro to create a pie chart. chart:type=pie
    2. Title the chart "Fish Sold 2004". {{title=Fish Sold 2004 }}
    3. Label the sections of the pie chart. {{ pieSectionLabel = %0% = %1%}}
  3. In the pieSectionLabel command the %0% is the variable for the pie section key: the type of fish. The %1% is the variable for the pie section numeric value. If you wanted to use the percent value rather than the numeric value, you would enter %2%, as so:

Or say you wanted to use the both the numerical value and find out the percentage as well.
Then your command line would look like: {chart:type=pie|title=Fish Sold 2004 | pieSectionLabel = %0% = %1% (%2%)}

And you chart would look like:

OR maybe you would like your pie graph in the exploded view. Type {chart:type=pie|title=Fish Sold 2004 | pieSectionExplode = Herring,Salmon,Tuna,Snapper)}

You want lables with that exploded pie? Your command line should be {chart:type=pie|title=Fish Sold 2004 | pieSectionLabel = %0% = %1% (%2%) |pieSectionExplode = Herring,Salmon,Tuna,Snapper}

Charts and Graphs
Pie Chart

  • No labels