1. Home
  2. Docs
  3. GLayer
  4. Charts
  5. LinearChart

LinearChart

Example of a LinearChart.

Linear chart types are the main way to display LinearField (numerical) data, using a chart.js Line Chart.

In addition to Common chart settings, the OrdinalChart type has the following settings:

  • X Label:
    Label for the X axis (shown below the chart).
  • Y label left/right:
    Y label for the left/right axis (shown next to the chart on the left/right side). The right label will only be shown if at least one data object is set to use the right axis.
  • Field ID:
    The ID of the field this chart will display and filter. The chart min and max on the x-axis will depend on the field min/max setting.
  • Data:
    An array of dataset objects with the following properties:
    • Values:
      The ID of the field to get values for. Data returned will be selected from the database column according to this field’s sourceName setting.
    • Function:
      Aggregation function to use when calculating data for this dataset.
    • Y scale:
      Scale for the Y axis. Can be set to Linear (default), Logarithmic, or Dynamic (will switch between Linear and Logarithmic depending on displayed data).
    • Label:
      Label for this dataset (shown in chart legend).
    • Y axis:
      Selects which axis this chart should use (Left or Right). Useful for showing multiple datasets with different values in a single chart.
  • Use values only:
    When set to true, the Field ID setting will be ignored, and individual dataset Values settings will be used instead. Useful when comparing datasets with no common x Axis.
  • Compare type:
    Defines how this chart should behave in the compare module. Can be either basic (base and compared datasets are side-by-side), sum (the selected dataset value is added to the base), difference (the selected dataset value is deducted from the base), or none (the chart is not visible in the compare module).

Was this article helpful to you? Yes No

How can we help?