(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)

Line Chart

Overview

Line Chart Example

Specs

Tokens

Token Description
showLegend Controls whether the legend is displayed.
chartConfiguration Defines chart settings including series and argument field.
chartPanesConfiguration Configures panes that split the chart vertically.
argumentAxisTitle Title for the X-axis.
valueAxisTitle Title for the Y-axis.
paddingClass Sets CSS padding classes for spacing.
useMockData Uses mock data instead of API data.
dataSourceId Identifier for the chart data source.
getEntityCollectionHttpRequestParametersMap Configures HTTP request parameters for API calls.
events Configurable component events.
ON_INIT (Events) Event triggered on initialization.
ON_DESTROY (Events) Event triggered on removal.
visibilityPolicySetId Controls visibility via authorization policy.
displayConditions Defines when the chart is displayed.
displayName Display name shown in the structure panel.
id Unique identifier for the component.
dataTestId Testing hook ID.
enableAsHotspot Enables the chart as a guided tour hotspot.
guidedTourHotSpotTitle Title for guided tour hotspot.
guidedTourHotSpotDescription Description for guided tour hotspot.

Structure

(Configured in General Properties)

(Configured in Visual Properties)

{
  "series": [
    { "valueField": "point1", "name": "Sales", "color": "#6BAC3E", "visible": true },
    { "valueField": "point2", "name": "Revenue", "color": "#3C8DBC", "visible": true }
  ],
  "argumentField": "createdOn",
  "dataPathExpression": "content"
}
{
  "panes": [
    { "name": "topPane", "height": 60 },
    { "name": "bottomPane", "height": 40 }
  ]
}

Datasource

(Configured in Datasource)

{
  "PATH": { "year": "context.selectedYear" },
  "QUERY": { "division": "context.selectedDivision" }
}
[
  { "createdOn": "2019-12-01T23:00:00.000Z", "point1": 4, "point2": 2 },
  { "createdOn": "2019-12-02T23:00:00.000Z", "point1": 4, "point2": 10 },
  { "createdOn": "2019-12-03T23:00:00.000Z", "point1": 5, "point2": 2 }
]

(Configured in Visibility)

[
  { "field": "context.hasData", "operator": "equals", "value": true }
]

Styling

(Configured in Visual Properties)

Visual Properties tab

Actions & Events

(Configured in Events)

Tests

(Configured in Testing Hooks)

{ "en-US": "Sales Performance", "fr-FR": "Performance des ventes" }
{ "en-US": "This chart shows monthly sales trends", "fr-FR": "Ce graphique montre les tendances des ventes mensuelles" }

Authorization

(Configured in Authorization)

Links

Guidelines

Usage

Sizing & Layout

Color & Contrast

Visibility & Authorization

Content & Localization

Dos & Don’ts

Do Don’t Article setting(s)
Label axes with purpose and units (e.g., “Date”, “Sales (USD)”). Leave axes unlabeled or rely on external context. argumentAxisTitle, valueAxisTitle
Turn on the legend for multi-series charts and name each series. Show multiple colored lines without labels or a legend. showLegend, chartConfiguration.series[].name
Separate metrics with different scales into vertical panes. Overlay vastly different ranges on one pane. chartPanesConfiguration, chartConfiguration.series[]
Bind the X argument and Y values explicitly. Depend on implicit or positional fields. chartConfiguration.argumentField, chartConfiguration.series[].valueField
Point to the nested array before binding fields. Bind to parent objects and get an empty chart. chartConfiguration.dataPathExpression
Render only when data is ready. Display an empty frame that looks broken. displayConditions
Use mock data for demos/dev; disable it for production. Ship with mock data enabled. useMockData
Expose stable test selectors. Select elements by volatile text. dataTestId, id
Clean up on unmount. Leave intervals/listeners running. events.ON_DESTROY

Accessibility