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 available: "column" , "bar_h" , "line" , "scatter" , "pie" , "stacked_column" , and "column_line"
Live example.Default value: "column" . |
title String | optional The title of the chart
Live example. Default value: "" . |
showFilter Boolean | optional Specifies whether filter controls are visible on the chart (true ) or not (false ). These include rows and columns filter controls and report filter controls
Live example.To hide filter controls in the grid view, use the grid.showFilter option. Default value: true . |
multipleMeasures Boolean | optional Specifies whether to show multiple measures on the charts (true ) or not (false ).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 chart.oneLevel to true
Live example.This property does not affect multilevel hierarchies. Default value: false (all fields are shown on the X-axis and the legend). |
autoRange Boolean | optional Specifies whether the range of values in the charts is determined automatically (true ) or not (false )
Live example.Default value: false . |
reversedAxes Boolean | optional Specifies whether the columns and rows are reversed on the charts (true ) or not (false ).Default value: false . |
showLegend Boolean | optional Specifies whether the legend for the charts is visible (true ) or not (false ).Default value: true . |
showLegendButton Boolean | optional Specifies whether the button to show or hide the legend for the charts is visible (true ) or not (false )
Live example.Default value: false . |
showDataLabels Boolean | optional Specifies whether to show labels on the charts (true ) or not (false )
Live example.Use showAllLabels to configure the labels in a pie chart. Default value: false . |
showAllLabels Boolean | optional Specifies whether to show all labels in a pie chart (true ) or not (false ). If showAllLabels is false , only the labels that can be shown without overlapping will be shown.Default value: false . |
showMeasures Boolean | optional Specifies 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 the 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 Specifies whether warnings are shown (true ) or not (false ) if the data is too big for charts.Default value: true . |
position String | optional Specifies the position of the charts in relation to the grid. The following positions are available: "bottom" , "top" , "left" , or "right" . Only for viewType: "grid_charts" .Live example. Default value: "bottom" . |
activeMeasure MeasureIdentifierObject | MeasureIdentifierObject[] | optional Specifies the measures selected for the chart. The specified measures must be present in the slice.measures property. By default, chart.activeMeasure is a MeasureIdentifierObject. If the chart.multipleMeasures option is set to true , chart.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 chart.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 Specifies whether axes labels on charts are displayed using a short number format like 10K, 10M, 10B, 10T (true ) or not (false ).Default value: undefined (show short format if the max value > 10M). |
Options guide
OptionsObject
GridOptionsObject
getOptions()
setOptions()