You are currently offline, serving cached version

Chart Module

This module exposes a tag to update chart data of an existing chart.

This module is available as part of the docxtemplater ENTREPRISE plan.

Usage

The chart module allows to replace data from an existing chart.

To use the module, you need to create a chart inside your Word document.

The paragraph after the chart should contain a tag starting with a $ sign, such as {$chart1}

Then, in your code, you can write :

{
  "title": "The lorem chart",
  "chart1": {
    "categories": [
      "5th Qtr",
      "6th Qtr",
      "7th Qtr",
      "8th Qtr"
    ],
    "series": [
      {
        "data": [
          100,
          5,
          45,
          40
        ]
      }
    ]
  }
}

For bar charts, area charts, radar charts, it can make sense to have multiple series.

CHANGELOG

3.0.0

  • Initial version of the Chart module

I'm the creator of docxtemplater. I work on making docxtemplater great since 2013.