Skip to main content

ChartType

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

Type

Enumeration

Values

  • "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"

Example

This example shows how to create a chart.

// ChartType used in text documents
// The resulting chart will have a 'bar3D' type:
var chart = 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 chart = worksheet.AddChart("'Sheet1'!$A$1:$D$3", true, "bar3D", 2, 100 * 36000, 70 * 36000, 0, 2 * 36000, 7, 3 * 36000);