PPTX.gallery
chartsline-chartsapi

Overview

Line charts show trends over time and are essential for growth metrics, financial data, and performance tracking. The pptx.dev API supports basic lines, lines with markers, multi-series lines, stacked lines, and high-low ranges plotted as extra series.

Line Chart Types

Chart type Description
line Basic line chart
line-with-markers Line with data point markers
stacked-line-3x Stacked line
stacked-line-with-markers-3x Stacked line with markers

The number of series comes from your data, so a two- or three-series trend uses the same line or line-with-markers type. These are the line chart types Aspose.Slides supports. High/low bands are not a separate chart type: add the high and low bounds as extra series on a line chart, as in the band example below.

Example: Monthly Revenue Trend

{
  "$schema": "https://openpresentation.org/schema/opf/v1",
  "name": "Monthly Revenue Trend",
  "slides": [
    {
      "layout": "chart-1x-title-center",
      "title": "Monthly Revenue Trend",
      "chart": {
        "type": "line-with-markers",
        "data": {
          "columns": [
            "Series",
            "Jan",
            "Feb",
            "Mar",
            "Apr",
            "May",
            "Jun"
          ],
          "rows": [
            [
              "Revenue ($K)",
              120,
              135,
              128,
              155,
              170,
              195
            ]
          ]
        }
      },
      "design": {
        "titleAlignment": "center",
        "contentAlignment": "center"
      }
    }
  ],
  "catalogs": {
    "layouts": {
      "records": [
        {
          "$schema": "https://openpresentation.org/schema/opf-layout/v1",
          "id": "chart-1x-title-center",
          "name": "Chart 1x Title Center",
          "placeholders": [
            {
              "type": "title"
            },
            {
              "type": "chart"
            }
          ]
        }
      ]
    }
  }
}

Example: Multi-Channel Comparison

Add one series per dimension to compare trends; the chart type stays line-with-markers:

{
  "$schema": "https://openpresentation.org/schema/opf/v1",
  "name": "Traffic by Channel",
  "slides": [
    {
      "layout": "chart-1x-title-center",
      "title": "Traffic by Channel",
      "chart": {
        "type": "line-with-markers",
        "data": {
          "columns": [
            "Series",
            "Jan",
            "Feb",
            "Mar",
            "Apr",
            "May",
            "Jun"
          ],
          "rows": [
            [
              "Organic",
              4200,
              4800,
              5100,
              5600,
              6200,
              7000
            ],
            [
              "Paid",
              3100,
              3400,
              3200,
              3800,
              4100,
              4500
            ],
            [
              "Referral",
              800,
              900,
              1100,
              1200,
              1400,
              1600
            ]
          ]
        }
      },
      "design": {
        "titleAlignment": "center",
        "contentAlignment": "center"
      }
    }
  ],
  "catalogs": {
    "layouts": {
      "records": [
        {
          "$schema": "https://openpresentation.org/schema/opf-layout/v1",
          "id": "chart-1x-title-center",
          "name": "Chart 1x Title Center",
          "placeholders": [
            {
              "type": "title"
            },
            {
              "type": "chart"
            }
          ]
        }
      ]
    }
  }
}

Example: Line with a High-Low Range

Show a metric with its confidence interval or range by plotting the bounds as extra series:

{
  "$schema": "https://openpresentation.org/schema/opf/v1",
  "name": "Response Time (p50 with p10–p90 band)",
  "slides": [
    {
      "layout": "chart-1x-title-center",
      "title": "Response Time (p50 with p10–p90 band)",
      "chart": {
        "type": "line-with-markers",
        "data": {
          "columns": [
            "Series",
            "Mon",
            "Tue",
            "Wed",
            "Thu",
            "Fri"
          ],
          "rows": [
            [
              "p50 (ms)",
              45,
              42,
              48,
              44,
              41
            ],
            [
              "p90",
              120,
              110,
              135,
              115,
              105
            ],
            [
              "p10",
              12,
              10,
              15,
              11,
              9
            ]
          ]
        }
      },
      "design": {
        "titleAlignment": "center",
        "contentAlignment": "center"
      }
    }
  ],
  "catalogs": {
    "layouts": {
      "records": [
        {
          "$schema": "https://openpresentation.org/schema/opf-layout/v1",
          "id": "chart-1x-title-center",
          "name": "Chart 1x Title Center",
          "placeholders": [
            {
              "type": "title"
            },
            {
              "type": "chart"
            }
          ]
        }
      ]
    }
  }
}

When to Use Line Charts

Use case Chart type
Single metric trend line or line-with-markers
Comparing 2-3 trends line or line-with-markers with one series per trend
Showing ranges/bands line-with-markers with high and low series
Cumulative totals stacked-line-3x

Line vs. Column

  • Use line charts when the x-axis represents time and you want to emphasize the trend.
  • Use column charts when comparing discrete categories or when the exact values matter more than the trend.

Next Steps