Charts - Overview

Adding a new chart - steps and tests

  1. Analysis - add chart type page with schema for each new chart element and see if there’s anything distinctive about the chart type series
  2. feature/sld-add-chart .. add new chart types, steps/chart.py
  3. pptx/chart/xmlwriter.py add new type to ChartXmlWriter
  4. pptx/chart/xmlwriter.py add _AreaChartXmlWriter, one per new element type
  5. pptx/chart/series.py add AreaSeries, one per new element type

There are 73 different possible chart types, but only 16 distinct XML chart-type elements. The implementation effort is largely proportional to the number of new XML chart-type elements.

Here is an accounting of the implementation status of the 73 chart types:

29 - supported for creation so far

areaChart

  • AREA
  • AREA_STACKED
  • AREA_STACKED_100

barChart

  • BAR_CLUSTERED
  • BAR_STACKED
  • BAR_STACKED_100
  • COLUMN_CLUSTERED
  • COLUMN_STACKED
  • COLUMN_STACKED_100

bubbleChart

  • BUBBLE
  • BUBBLE_THREE_D_EFFECT

doughnutChart

  • DOUGHNUT
  • DOUGHNUT_EXPLODED

lineChart

  • LINE
  • LINE_MARKERS
  • LINE_MARKERS_STACKED
  • LINE_MARKERS_STACKED_100
  • LINE_STACKED
  • LINE_STACKED_100

pieChart

  • PIE
  • PIE_EXPLODED

radarChart

  • RADAR
  • RADAR_FILLED
  • RADAR_MARKERS

scatterChart

  • XY_SCATTER
  • XY_SCATTER_LINES
  • XY_SCATTER_LINES_NO_MARKERS
  • XY_SCATTER_SMOOTH
  • XY_SCATTER_SMOOTH_NO_MARKERS

44 remaining:

area3DChart

  • THREE_D_AREA
  • THREE_D_AREA_STACKED
  • THREE_D_AREA_STACKED_100

bar3DChart (28 types)

  • THREE_D_BAR_CLUSTERED
  • THREE_D_BAR_STACKED
  • THREE_D_BAR_STACKED_100
  • THREE_D_COLUMN
  • THREE_D_COLUMN_CLUSTERED
  • THREE_D_COLUMN_STACKED
  • THREE_D_COLUMN_STACKED_100
  • CONE_BAR_CLUSTERED
  • CONE_BAR_STACKED
  • CONE_BAR_STACKED_100
  • CONE_COL
  • CONE_COL_CLUSTERED
  • CONE_COL_STACKED
  • CONE_COL_STACKED_100
  • CYLINDER_BAR_CLUSTERED
  • CYLINDER_BAR_STACKED
  • CYLINDER_BAR_STACKED_100
  • CYLINDER_COL
  • CYLINDER_COL_CLUSTERED
  • CYLINDER_COL_STACKED
  • CYLINDER_COL_STACKED_100
  • PYRAMID_BAR_CLUSTERED
  • PYRAMID_BAR_STACKED
  • PYRAMID_BAR_STACKED_100
  • PYRAMID_COL
  • PYRAMID_COL_CLUSTERED
  • PYRAMID_COL_STACKED
  • PYRAMID_COL_STACKED_100

line3DChart

  • THREE_D_LINE

pie3DChart

  • THREE_D_PIE
  • THREE_D_PIE_EXPLODED

ofPieChart

  • BAR_OF_PIE
  • PIE_OF_PIE

stockChart

  • STOCK_HLC
  • STOCK_OHLC
  • STOCK_VHLC
  • STOCK_VOHLC

surfaceChart

  • SURFACE
  • SURFACE_WIREFRAME

surface3DChart

  • SURFACE_TOP_VIEW
  • SURFACE_TOP_VIEW_WIREFRAME

Chart parts glossary

data point (point)
An individual numeric value, represented by a bar, point, column, or pie slice.
data series (series)
A group of related data points. For example, the columns of a series will all be the same color.
category axis (X axis)
The horizontal axis of a two-dimensional or three-dimensional chart.
value axis (Y axis)
The vertical axis of a two-dimensional or three-dimensional chart.
depth axis (Z axis)
The front-to-back axis of a three-dimensional chart.
grid lines
Horizontal or vertical lines that may be added to an axis to aid comparison of a data point to an axis value.
legend
A key that explains which data series each color or pattern represents.
floor
The bottom of a three-dimensional chart.
walls
The background of a chart. Three-dimensional charts have a back wall and a side wall, which can be formatted separately.
data labels
Numeric labels on each data point. A data label can represent the actual value or a percentage.
axis title
Explanatory text label associated with an axis
data table
A optional tabular display within the plot area of the values on which the chart is based. Not to be confused with the Excel worksheet holding the chart values.
chart title
A label explaining the overall purpose of the chart.
chart area
Overall chart object, containing the chart and all its auxiliary pieces such as legends and titles.
plot area
Region of the chart area that contains the actual plots, bounded by but not including the axes. May contain more than one plot, each with its own distinct set of series. A plot is known as a chart group in the MS API.
axis

… may be either a category axis or a value axis … on a two-dimensional chart, either the horizontal (x) axis or the vertical (y) axis. A 3-dimensional chart also has a depth (z) axis. Pie, doughnut, and radar charts have a radial axis.

How many axes do each of the different chart types have?

series categories
series values

Chart types

  • column
    • 2-D column
      • clustered column
      • stacked column
      • 100% stacked column
    • 3-D column
      • 3-D clustered column
      • 3-D stacked column
      • 3-D 100% stacked column
      • 3-D column
    • cylinder
    • cone
    • pyramid
  • line
    • 2-D line
    • 3-D line
  • pie
    • 2-D pie
    • 3-D pie
  • bar
    • 2-D bar
    • 3-D bar
    • cylinder
    • cone
    • pyramid
  • area
  • scatter
  • other
    • stock (e.g. open-high-low-close)
    • surface
    • doughnut
    • bubble
    • radar