Need a special offer?Find out if your project fits.
+
All documentation
  • API Reference for older versions
  • ChartOptionsObject

    This object allows setting options for the chart view.

    Properties

    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/TypeDescription
    type
    String
    optional The selected chart type. The following chart types are available: "column", "bar_h", "line", "scatter", "pie", "stacked_column", and "column_line". See an example.
    Default value: "column".
    title
    String
    optional The title of the chart. See an 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. Check out an example on JSFiddle.
    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. 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 Specifies whether the range of values in the charts is determined automatically (true) or not (false). See an 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). Check out an example on JSFiddle.
    Default value: false.
    showDataLabels
    Boolean
    optional Specifies whether to show labels on the charts (true) or not (false). See an example on JSFiddle.
    Use chart.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 chart.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 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".
    See an 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).

    See also

    Options guide
    OptionsObject
    GridOptionsObject
    getOptions()
    setOptions()