Chart Element

Chart Types

The chartType property determines the visualization style:

  • bar: Vertical or horizontal bar chart
  • line: Line chart with optional smoothing
  • area: Area chart with filled regions
  • scatter: Scatter plot with data points
  • pie: Pie chart showing proportions
  • doughnut: Doughnut chart (pie chart with center hole)
  • radar: Radar/spider chart

Data Structure

The dataSet is an array of data objects, where each object contains:

  • dataTime: The time point relative to the ChartNode (in seconds)
  • dataPoints: An array of data points to be displayed at this time

Each data point in dataPoints contains:

  • id: Unique identifier for the data point
  • label: The label/name of the data point
  • value: The numeric value
  • color (optional): Custom color for this data point in hex format

Label Styling

The labelStyle object controls the appearance of chart labels:

  • Font properties: fill, fontSize, fontFamily, fontWeight
  • Stroke properties: stroke, strokeThickness
  • Shadow properties: dropShadow, dropShadowColor, dropShadowBlur, dropShadowDistance, dropShadowAngle, dropShadowAlpha

Line and Area Chart Features

For line and area charts, you can configure:

  • linePointStyle: Display data points as filled circles or hollow circles
  • lineSmooth: Enable smooth curves instead of straight lines
  • lineAreaAlpha: Control the opacity of the filled area (area charts only)

Bar Chart Features

For bar charts, you can configure:

  • barOrientation: Display bars vertically or horizontally
  • barCornerRadius: Round the corners of bars
  • showBarBackground: Display a background behind bars
  • barBackgroundColor/barBackgroundAlpha: Style the bar background

Legend Configuration

Enable and customize the chart legend:

  • showLegend: Toggle legend visibility
  • legendPosition: Position of the legend (currently supports "bottom")
  • legendItemSize: Size of legend color indicators
  • legendGap: Spacing between legend items
Docs - Chillin