Top.Mail.Ru
Line Chart
CTRL+K

Line Chart

In this article
  • Line Chart
  • Widget Settings
  • Data Settings
  • Display Settings
  • Filtering Settings
  • Widget Configuration in YAML
  • Data Settings in YAML
  • Display Settings in YAML
  • Filtering Settings in YAML
  • Example of a Configured Widget in the YAML Editor

A Line Chart is a type of chart used to visualize data that changes over time or across categories. It consists of data points connected by lines, making it easy to identify trends and patterns.

Line graph example

Widget Settings

In addition to the common widget settings, this widget has unique configuration options.

Data Settings

The widget supports two dimension groups: Dimension 1 and Dimension 2. You can add multiple dimensions to each group. For dimensions, you can hide empty values, assign click actions, and configure the Display setting (Always / By variable / By formula). You can also add measures. Additionally, for each measure you can set line thickness, enable Data labels, and specify their size.

Note

The availability of color configuration modes for dimensions and measures depends on the widget’s configuration.

1 Dimension2 Dimensions
1 MeasureFor the dimension:
Color settings unavailable

For the measure, allowed rule mode:
1. Solid
For Dimension 1:
Color settings unavailable

For Dimension 2, available modes:
1. Disabled
2. By values (only rules with Solid mode are allowed)
3. By rule (only dimension-based rules added to the widget are allowed)

For the measure:
Color settings unavailable
Multiple MeasuresFor the dimension:
Color settings unavailable

For measures, allowed rule mode:
1. Solid
For measures:
Color settings unavailable

Display Settings

Text Size

Controls the text size in the widget, excluding measure Data labels.

Dimension Limits

  • Dimension 1 Limit and Dimension 2 Limit control the number of data points (or series) displayed on the chart.

Hide Empty Values

Enable this option to exclude empty values from the chart.

Hint

When enabled, hovering over a data point in Browse mode displays a hint with detailed information about the underlying data.

Chart Type

Controls how lines are rendered: Standard lines, Area, or Stacked area. You can also enable line smoothing, show total Data labels (for stacked area charts), and adjust the label text size.

Legend

For details on legend configuration, see Widgets.

X-Axis

For the X-axis, you can enable a title and configure label rotation and height.

Y-Axis

For the Y-axis, you can enable a title, set label width, and define a custom range.

Note
  • Y-axis values on the graph start not from 0, but from the minimum value present in the measures.
  • If the defined range is smaller than a measure’s value, the graph automatically scales to accommodate the data. Values outside the visible range are displayed without markers beyond the chart boundary.
  • You can independently enable or disable either axis.

Filtering Settings

The widget supports standard filtering settings.

Note
  • Filters configured within the widget cannot be removed in Browse mode.
  • When a filter is applied via click in Browse mode, the corresponding points on the line are highlighted.

Widget Configuration in YAML

You can configure the widget not only visually but also in the YAML editor. The table below lists the keys and values available for configuration. For details on using the value key, see Dimension and Measure Values in YAML. Supported data formats are described on the corresponding page. General widget parameters are covered in Widget Configuration in YAML.

Data Settings in YAML

KeyTypeDefinition
titlestringTitle
showMarkdownbooleanDescription
markdownTextstringDescription text
markdownMeasuresMeasures in description
dimensionsFirstGroupDimension 1
dimensionsSecondGroupDimension 2
measuresMeasures
sortingSorting

Dimension 1 (key: dimensionsFirstGroup)

KeyTypeDefinition
namestringDimension title
valueDimension formula
dbDataTypeenumDimension data type
formatenumFormat
formattingenumFormatting
formattingTemplatestringCustom formatting
Only for CUSTOM formatting
hideEmptyValuesbooleanHide empty values
hierarchyDimensionsHierarchy dimensions
If added, the indicator is defined as a hierarchy
onClickClick actions
Not applied if hierarchical
displayConditionDisplay (display condition)
arrayNestingbooleanArray nesting
Hierarchical Dimension for Dimension 1 (key: hierarchyDimensions)
KeyTypeDefinition
namestringDimension title
valueDimension formula
dbDataTypeenumDimension data type
formatenumFormat
formattingenumFormatting
formattingTemplatestringCustom formatting
Only for CUSTOM formatting
hideEmptyValuesbooleanHide empty values
onClickClick actions
displayConditionDisplay (display condition)
arrayNestingbooleanArray nesting

Dimension 2 (key: dimensionsSecondGroup)

KeyTypeDefinition
namestringDimension title
valueDimension formula
dbDataTypeenumDimension data type
formatenumFormat
formattingenumFormatting
formattingTemplatestringCustom formatting
Only for CUSTOM formatting
hideEmptyValuesbooleanHide empty values
hierarchyDimensionsHierarchy dimensions
If added, the indicator is defined as a hierarchy
onClickClick actions
Not applied if hierarchical
colorColor:
- DISABLED — disabled
- VALUES — by values
- RULE — by rule
Not applied if:
1. Indicator is hierarchical
2. No dimension is added to the first group
displayConditionDisplay (display condition)
arrayNestingbooleanArray nesting
Hierarchical Dimension for Dimension 2 (key: hierarchyDimensions)
KeyTypeDefinition
namestringDimension title
valueDimension formula
dbDataTypeenumDimension data type
formatenumFormat
formattingenumFormatting
formattingTemplatestringCustom formatting
Only for CUSTOM formatting
hideEmptyValuesbooleanHide empty values
onClickClick actions
colorColor:
- DISABLED — disabled
- VALUES — by values
- RULE — by rule
Not applied if no dimension is added to the first group
displayConditionDisplay (display condition)
arrayNestingbooleanArray nesting

Measures in YAML (key: measures)

KeyTypeDefinition
namestringMeasure title
valueMeasure formula
dbDataTypeenumMeasure data type
formatenumFormat
formattingenumFormatting
formattingTemplatestringCustom formatting
Only for CUSTOM formatting
lineThicknessenumLine thickness:
- THIN — thin
- THICK — thick
showLabelsData labels
colorColor:
- AUTO — auto
- BASE — solid
- RULE — by rule
Not displayed if dimensions are added to both groups
displayConditionDisplay (display condition)
Show Value Labels (key: showLabels)
KeyTypeDefinition
enabledbooleanEnable/disable labels
sizenumberLabel size

Display Settings in YAML

KeyTypeDefinition
paddingsstringSide paddings
titleSizenumberTitle size
titleColorTitle color:
- AUTO — auto
- BASE — solid
titleWeightenumFont weight:
- NORMAL — normal
- BOLD — bold
markdownTextSizenumberMarkdown description text size
Available only if Description is enabled
textSizenumberText size
firstDimensionLimitnumberDimension 1 limit
secondDimensionLimitnumberDimension 2 limit
hideEmptyValuesbooleanHide empty values
showHintbooleanHint
chartTypeenumChart type:
- LINE — standard lines
- AREA — area
- STACKED_AREA — stacked area
lineSmoothingbooleanLine smoothing
legendLegend
showTotalLabelsTotal Data labels
Only for STACKED_AREA type
xAxisX-axis settings
yAxisY-axis settings

Total Value Labels (key: showTotalLabels)

KeyTypeDefinition
enabledbooleanEnable/disable total labels
sizenumberLabel size

X-Axis Settings (key: xAxis)

KeyTypeDefinition
enabledbooleanEnable/disable X-axis
rotationnumberLabel rotation
heightnumberLabel height
showTitlebooleanTitle

Y-Axis Settings (key: yAxis)

KeyTypeDefinition
enabledbooleanEnable/disable Y-axis
widthnumberLabel width
showTitlebooleanTitle
rangeSwitchbooleanEnable/disable custom range
rangeRange values
Range Values in YAML (key: range)
KeyTypeDefinition
minnumberMinimum value
maxnumberMaximum value

Filtering Settings in YAML

KeyTypeDefinition
filterModeenumFilter mode:
- DEFAULT — default
- SINGLE — single selection
- DISABLED — disabled
ignoreFiltersbooleanIgnore filters
filtersFilters
aggregateFiltersAggregate filters
stateNamestringState

Example of a Configured Widget in the YAML Editor

- key: LINE_CHART
  apiVersion: "16"
  type: LINE_CHART
  settings:
    displayCondition:
      mode: DISABLED
    textSize: 12
    xAxis:
      showTitle: false
      enabled: true
    lineSmoothing: true
    showMarkdown: false
    ignoreFilters: false
    markdownMeasures: []
    legend:
      position: BOTTOM
      align: CENTER
    dimensionsFirstGroup:
      - displayCondition:
          mode: DISABLED
        dbDataType: STRING
        onclick: []
        name: Events
        format: STRING
        value:
          mode: FORMULA
          formula: '"event_log"."event_name"'
        formatting: AUTO
        onClick: []
    filters: []
    titleSize: 14
    title: ""
    filterMode: DEFAULT
    yAxis:
      rangeSwitch: false
      showTitle: false
      range: {}
      enabled: true
    measures:
      - displayCondition:
          mode: DISABLED
        color:
          mode: BASE
          value: "#00d2d3"
        lineThickness: THIN
        dbDataType: STRING
        name: count (distinct incident_id)
        format: NUMBER
        value:
          mode: TEMPLATE
          templateName: countDistinct
          dbType: CH
          tableName: case_table
          columnName: incident_id
        formatting: AUTO
        valueLabel:
          size: 12
          enabled: true
        showLabels:
          enabled: true
          size: 12
    dimensionsSecondGroup: []
    markdownText: ""
    stateName: null
    sorting: []
    chartType: AREA
    stateGuid: f12c435a-43b8-4f98-8fc5-220adba5ffcb
    secondDimensionLimit: 50
    firstDimensionLimit: 15
    showTotalLabels:
      size: 12
      enabled: false
    titleColor:
      mode: AUTO
    titleWeight: NORMAL

Was the article helpful?

Yes
No
Previous
Bar Chart
We use cookies to improve our website for you.