Excel chart reference

July 24, 2026 · View on GitHub

This page is generated from the live Excel chart-template registry (scripts/gen-chart-reference.ts). Do not edit it by hand — run npm run gen:reference.

The Excel backend compiles a Flint specification into a versioned native-chart artifact, which Office.js turns into an editable chart in an Excel workbook.

Supported charts

The backend currently supports 18 chart types. Use the exact name shown below in chart_spec.chartType.

Flint chart typeEncoding channelsNative Excel.ChartType
Bar Chartx, y, colorColumnClustered / BarClustered
Grouped Bar Chartx, y, groupColumnClustered / BarClustered
Stacked Bar Chartx, y, colorColumnStacked / BarStacked
Pyramid Chartx, y, colorBarStacked
Line Chartx, y, color, strokeDashLine
Area Chartx, y, colorArea
Scatter Plotx, y, color, sizeXYScatter
Connected Scatter Plotx, y, order, color, detailXYScatterLines
Pie Chartcolor, size, thetaPie
Donut Chartcolor, size, thetaDoughnut
Histogramx, colorColumnClustered
Boxplotx, y, colorBoxWhisker
Candlestick Chartx, open, high, low, closeStockOHLC
Waterfall Chartx, y, colorWaterfall
Radar Chartx, y, colorRadarMarkers
Funnel Charty, sizeFunnel
Treemapcolor, size, detailTreemap
Sunburst Chartcolor, size, group, detailSunburst

Compile and render

assembleExcel(input) returns a flint.excel.chart/v1 artifact. It describes the worksheet data matrix, native chart type, series bindings, axes, legend, labels, and formatting, but does not open Excel itself.

import { assembleExcel, renderExcelChart } from 'flint-chart';

const artifact = assembleExcel(input);
const result = await renderExcelChart(Excel, artifact);

renderExcelChart must run in an Excel host that provides Office.js Excel.run and Excel.ImageFittingMode.fit. It creates a native chart on the active worksheet and returns a PNG captured through Chart.getImage().

Call generateOfficeJs(artifact) when you need portable Office.js source instead of immediate execution.

Limitations

  • A single native Excel chart does not support Flint column or row facets.
  • Chart types without a native Excel equivalent, such as Heatmap, are rejected before rendering.
  • Some charts impose stricter data requirements. For example, scatter charts require quantitative x and y, while candlesticks require open, high, low, and close. The assembler reports a specific validation error.

Use excelGetTemplateDef(chartType) or excelGetTemplateChannels(chartType) to check support before compiling.