ChartType

type ChartType = bar | barStacked | barStackedPercent | bar3D | barStacked3D | barStackedPercent3D | barStackedPercent3DPerspective | horizontalBar | horizontalBarStacked | horizontalBarStackedPercent | horizontalBar3D | horizontalBarStacked3D | horizontalBarStackedPercent3D | lineNormal | lineStacked | lineStackedPercent | line3D | pie | pie3D | doughnut | scatter | stock | area | areaStacked | areaStackedPercent | comboBarLine | comboBarLineSecondary | comboCustom | unknown

Description

This type specifies the available chart types which can be used to create a new chart.

Try It

// ChartType used in text documents
// The resulting chart will have a 'bar3D' type:
var oChart = Api.CreateChart("bar3D", [[200, 240, 280],[250, 260, 280]], ["Projected Revenue", "Estimated Costs"], [2014, 2015, 2016], 4051300, 2347595, 24);

// ChartType used in spreadsheets
// The resulting chart will have a 'bar3D' type:
var oChart = oWorksheet.AddChart("'Sheet1'!$A$1:$D$3", true, "bar3D", 2, 100 * 36000, 70 * 36000, 0, 2 * 36000, 7, 3 * 36000);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).