This object allows setting options for the chart view.
chart: { type: string, title: string, showFilter: boolean, multipleMeasures: boolean, oneLevel: boolean, autoRange: boolean, reversedAxes: boolean, showLegend: boolean, showLegendButton: boolean, showDataLabels: boolean, showAllLabels: boolean, showMeasures: boolean, showOneMeasureSelection: boolean, showWarning: boolean, position: string, activeMeasure: MeasureIdentifierObject | MeasureIdentifierObject[], pieDataIndex: string, axisShortNumberFormat: boolean }
Property/Type | Description |
---|---|
type String |
optional The selected chart type. The following chart types are supported: "column" , "bar_h" , "line" , "scatter" , "pie" , "stacked_column" , and "column_line" .Default value: "column" . |
title String |
optional The title of the chart. Default value: "" . |
showFilter Boolean |
optional Indicates whether column/row filter controls and report filter controls are visible on the charts (true ) or not (false ).Default value: true . |
multipleMeasures Boolean |
optional Indicates whether to show multiple measures on charts. Default value: false . |
oneLevel Boolean |
optional By default, when there are multiple fields in rows or columns, all of them are shown on the chart's X-axis and legend. To show only the lowest expanded field, set the oneLevel to true . See an example on JSFiddle.This property does not affect multilevel hierarchies. Default value: false (all fields are shown on the X-axis and the legend). |
autoRange Boolean |
optional Indicates whether the range of values in the charts is selected automatically or not. Default value: false . |
reversedAxes Boolean |
optional Reverses the columns and rows when drawing charts. Default value: false . |
showLegend Boolean |
optional Indicates whether the legend for the charts is visible (true ) or not (false ).Default value: true . |
showLegendButton Boolean |
optional Indicates whether the button to show/hide the legend for the charts is visible. When set to false , the legend is visible, without a button to hide it.Default value: false . |
showDataLabels Boolean |
optional Setting this value to true allows showing labels in charts. If the value is false , the labels will be hidden. Use showAllLabels to configure the labels in a pie chart.Default value: false . |
showAllLabels Boolean |
optional Setting this value to true allows showing all the labels in a pie chart. If the value is false then only the labels that can be shown without overlapping will be shown.Default value: false . |
showMeasures Boolean |
optional Indicates whether the measures dropdown menu is visible (true ) or hidden (false ). Hiding the dropdown menu is useful if you want to simplify the chart view, limit the user's ability to make changes, or save space on the user's screen.Default value: true . |
showOneMeasureSelection Boolean |
optional When set to true , the measures dropdown is always visible - regardless of the number of measures in it. If the value is set to false , the measures dropdown on charts will be hidden if there is only one measure in the list and visible if there are two or more measures.Default value: true . |
showWarning Boolean |
optional Indicates whether warnings are shown if the data is too big for charts. Default value: true . |
position String |
optional The positions of the charts in relation to the grid. It can be "bottom" , "top" , "left" , or "right" .Default value: "bottom" . |
activeMeasure MeasureIdentifierObject | MeasureIdentifierObject[] |
optional Identifies the measures selected for the chart. The specified measures must be present in the slice.measures property. By default, activeMeasure is a MeasureIdentifierObject. If the chart.multipleMeasures option is set to true , activeMeasure is an array of MeasureIdentifierObjects. |
pieDataIndex String |
optional By default, when there are fields in columns, a pie chart is based on the first member of the first column field. The pieDataIndex allows choosing a different field member for the chart by specifying the member's index. Indexes start from "0" (the first member).If a non-existing index is specified in this property, the default index value will be used instead. See how the pie chart works. Default value: "0" . |
axisShortNumberFormat Boolean |
optional Indicates whether axes labels on charts are displayed in short number format like 10K, 10M, 10B, 10T (true ) or not (false ).Default value: undefined (show short format if max value > 10M). |
Options guide
OptionsObject
GridOptionsObject
getOptions()
setOptions()