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 lines with high-low bands.
Line Chart Types
| Chart type | Description |
|---|---|
LINE |
Basic line chart |
LINE_WITH_MARKERS |
Line with data point markers |
LINE_WITH_HIGH_LOW |
Line with a high/low range band |
LINE_WITH_HIGH_LOW_AND_MARKERS |
High/low band with markers |
LINE_2X |
Two-series line chart |
LINE_WITH_MARKERS_2X |
Two series with markers |
LINE_3X |
Three-series line chart |
STACKED_LINE_2X |
Two-series stacked line |
STACKED_LINE_3X |
Three-series stacked line |
Example: Monthly Revenue Trend
{
"layout": "chart-1x-title-center",
"content": {
"heading": "Monthly Revenue Trend",
"chart": {
"type": "LINE_WITH_MARKERS",
"categories": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
"series": [
{ "name": "Revenue ($K)", "values": [120, 135, 128, 155, 170, 195] }
]
}
}
}
Example: Multi-Channel Comparison
Use LINE_3X to compare trends across multiple dimensions:
{
"layout": "chart-1x-title-center",
"content": {
"heading": "Traffic by Channel",
"chart": {
"type": "LINE_WITH_MARKERS_3X",
"categories": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
"series": [
{ "name": "Organic", "values": [4200, 4800, 5100, 5600, 6200, 7000] },
{ "name": "Paid", "values": [3100, 3400, 3200, 3800, 4100, 4500] },
{ "name": "Referral", "values": [800, 900, 1100, 1200, 1400, 1600] }
]
}
}
}
Example: Line with High-Low Band
Show a metric with its confidence interval or range:
{
"layout": "chart-1x-title-center",
"content": {
"heading": "Response Time (p50 with p10–p90 band)",
"chart": {
"type": "LINE_WITH_HIGH_LOW_AND_MARKERS",
"categories": ["Mon", "Tue", "Wed", "Thu", "Fri"],
"series": [
{ "name": "p50 (ms)", "values": [45, 42, 48, 44, 41] },
{ "name": "p90", "values": [120, 110, 135, 115, 105] },
{ "name": "p10", "values": [12, 10, 15, 11, 9] }
]
}
}
}
When to Use Line Charts
| Use case | Chart type |
|---|---|
| Single metric trend | LINE or LINE_WITH_MARKERS |
| Comparing 2-3 trends | LINE_2X or LINE_3X |
| Showing ranges/bands | LINE_WITH_HIGH_LOW |
| Cumulative totals | STACKED_LINE_2X/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
- Add composition views with pie and doughnut charts
- Explore specialty charts like waterfall and funnel
- See all chart types