Skip to main content
  1. Snippits & Exemplars/
  2. Congo Exemplars/
  3. Congo's Shortcodes/

Chart

🦍 Shortcodes
badge outputs a styled badge component thematically aligned to tags

chart uses the Chart.js library to embed charts into articles using simple structured data. It supports a number of different chart styles and everything can be configured from within the shortcode. Simply provide the chart parameters between the shortcode tags and Chart.js will do the rest.

Refer to the official Chart.js docs for details on syntax and supported chart types.

Example:

{{< chart >}}
type: 'bar',
data: {
  labels: ['Tomato', 'Blueberry', 'Banana', 'Lime', 'Orange'],
  datasets: [{
    label: '# of votes',
    data: [12, 19, 3, 5, 3],
  }]
}
{{< /chart >}}

You can see some additional Chart.js examples on the charts samples page: