PowerPoint Generator API
  • PowerPoint Generator API
  • Getting started
    • Quick start
  • API reference
    • token/create
    • generator/create
  • Knowledge base
    • Key concepts
    • Templating your presentation
    • Building your JSON payload
    • Finding shape names
  • JSON/ PPTX Reference
    • presentation
    • slides
    • shapes
      • textbox
      • chart
      • picture
      • table
    • tags
    • Deprecated
  • Examples
    • Presentation
      • Naming output presentation
      • Using multiple templates
    • Slide
      • Change shape size and position
      • Change shape background color
      • Hide or remove shape
      • Replacing tags
    • Textboxes
      • Add text
      • Set font type and size
      • Set font color and font background color
      • Set bold, italic & underline
      • Set text alignment
      • Set text indentation
      • Set text line spacing
      • Using bullet-points
    • Chart
      • Change font settings
      • Insert data
      • Adjust chart legend
      • Appending to data labels
    • Pictures
    • Table
      • Populate simple table
      • Using `text_runs` in Table cells
      • Handling merged cells
      • Update a specific cells in existing table
    • Tags
Powered by GitBook
On this page

Was this helpful?

  1. Examples
  2. Chart

Appending to data labels

Append values to your data labels.

PreviousAdjust chart legendNextPictures

Last updated 2 years ago

Was this helpful?

Easily insert custom strings into the data label object using Overlays.

Using chart overlays

Use the array "overlays" to pass a list of objects for each corresponding data label. Each data label can have multiple overlays applied to it.

Overlays can require a 'value' (string), 'color' and where in relation to the data label the overlay needs to be positioned ('position').

Template presentation

JSON Payload

{
  "presentation": {
    "template": "Chart overlays.pptx",
    "export_version": "Pptx2010",
    "slides": [
      {
        "type": "slide",
        "slide_index": 1,
        "shapes": [
          {
            "name": "Chart 14",
            "title": "Automating shape types",
            "categoryTitle": "Month",
            "valueTitle": "Times used",
            "data": [
              [
                "Intense Demand",
                "Dip-in Demand",
                "Low-no Demand"
              ],
              [
                "Read a printed newspaper",
                "Visited a newspaper website",
                "Read a printed magazine",
                "Read a digital magazine",
                "None of the above"
              ],
              [
                25.87,
                38.58,
                49.69
              ],
              [
                49.05,
                40.58,
                38.45
              ],
              [
                100,
                75.23,
                34.98
              ],
              [
                6.54,
                5.64,
                4.96
              ],
              [
                78.32,
                95.75,
                97
              ]
            ],
            "overlays": [
              [
                {
                  "value": "↑",
                  "color": "255,0,0",
                  "position": "left"
                },
                {
                  "value": "↔",
                  "color": "255,0,0",
                  "position": "above"
                },
                {
                  "value": "↑",
                  "color": "255,0,0",
                  "position": "above"
                }
              ],
              [
                {
                  "value": "↓",
                  "color": "255,0,0",
                  "position": "below"
                }
              ],
              [
                {
                  "value": "↓",
                  "color": "255,0,0",
                  "position": "left"
                },
                {
                  "value": "↓",
                  "color": "255,0,0",
                  "position": "above"
                }
              ],
              [
                {
                  "value": " ↑",
                  "color": "255,0,0",
                  "position": "right"
                }
              ],
              [
                {
                }
              ],
              [
                {
                }
              ],
              [
                {
                  "value": "↑",
                  "color": "255,0,0",
                  "position": "right"
                }
              ],
              [
                {
                  "value": "↑",
                  "color": "255,0,0",
                  "position": "right"
                }
              ],
              [
                {
                }
              ],
              [
                {
                }
              ],
              [
                {
                }
              ],
              [
                {
                }
              ],
              [
                {
                  "value": "↔",
                  "color": "255,0,0",
                  "position": "below"
                }
              ],
              [
                {
                }
              ],
              [
                {
                }
              ]
            ]
          }
        ]
      }
    ]
  }
}

853KB
Chart overlays.pptx
Before
After