Getting StartedInstallation and package overview 2
Line15 line charts 15
Area8 area charts 8
Bar16 bar charts 16
Pie10 pie charts 10
Scatter11 scatter charts 11
Heatmap6 heatmap charts 6
Boxplot3 boxplot charts 3
Calendar5 calendar charts 5
Candlestick5 candlestick charts 5
Chord4 chord charts 4
Funnel4 funnel charts 4
Gauge9 gauge charts 9
Geo Map7 geo map charts 7
Graph6 graph charts 6
Lines2 lines charts 2
Matrix7 matrix charts 7
Parallel3 parallel charts 3
Pictorial Bar4 pictorial bar charts 4
Radar3 radar charts 3
Sankey6 sankey charts 6
Sunburst5 sunburst charts 5
Theme River1 theme river chart 1
Tree5 tree charts 5
Treemap4 treemap charts 4
CompositionSemi-headless chart surfaces and layout control 1

Scatter Chart styling

Scatter Chart presets read palette, axis, and text variables from the host. Tune colors on tng-scatter-chart or adjust generated options through optionOverride.

Theme variables

VariableFallback chainUsed for
--tng-chart-background--tng-semantic-background-canvas -> --tng-semantic-background-base -> --color-bgECharts background color for the plot.
--tng-chart-surface--tng-semantic-background-surface -> --color-surfaceSurface fallback used by tooltip and chart chrome.
--tng-chart-fg--tng-semantic-foreground-primary -> --color-fgPrimary ECharts text color.
--tng-chart-muted--tng-semantic-foreground-muted -> --tng-semantic-foreground-secondary -> --color-mutedLegend text, muted text, and secondary labels.
--tng-chart-border--tng-semantic-border-subtle -> --tng-semantic-border-default -> --color-borderShared border fallback for axes, grid, and tooltip borders.
--tng-chart-axis-label--tng-semantic-foreground-muted -> --tng-semantic-foreground-secondary -> --color-mutedAxis tick label color.
--tng-chart-axis-line--tng-chart-border -> --tng-semantic-border-subtle -> --tng-semantic-border-default -> --color-borderAxis line and tick color.
--tng-chart-grid-line--tng-chart-border -> --tng-semantic-border-subtle -> --tng-semantic-border-default -> --color-borderSplit line color for cartesian charts.
--tng-chart-tooltip-bg--tng-chart-surface -> --tng-semantic-background-surface -> --color-surfaceTooltip background color.
--tng-chart-tooltip-border--tng-chart-border -> --tng-semantic-border-subtle -> --tng-semantic-border-default -> --color-borderTooltip border color.
--tng-chart-series-1--tng-semantic-accent-brand -> --color-primaryFirst palette color for series, slices, or points.
--tng-chart-series-2--tng-semantic-accent-success -> --color-successSecond palette color.
--tng-chart-series-3--tng-semantic-accent-warning -> --color-warningThird palette color.
--tng-chart-series-4--tng-semantic-accent-danger -> --color-dangerFourth palette color.
--tng-chart-heatmap-low--tng-semantic-background-muted -> --tng-semantic-background-surface -> --color-surfaceLow value color in heatmap visual maps.
--tng-chart-heatmap-mid--tng-chart-info -> --color-info -> --tng-color-sky500 -> --tng-color-cyan500Mid value color in heatmap visual maps.
--tng-chart-heatmap-high--tng-semantic-accent-brand -> --color-primaryHigh value color in heatmap visual maps.

CSS starter

Chart theme variables

css
.analytics-panel tng-scatter-chart {
  --tng-chart-background: var(--tng-semantic-background-base);
  --tng-chart-surface: var(--tng-semantic-background-surface);
  --tng-chart-fg: var(--tng-semantic-foreground-primary);
  --tng-chart-muted: var(--tng-semantic-foreground-secondary);
  --tng-chart-border: var(--tng-semantic-border-subtle);
  --tng-chart-axis-label: var(--tng-semantic-foreground-secondary);
  --tng-chart-axis-line: var(--tng-semantic-border-default);
  --tng-chart-grid-line: color-mix(in srgb, var(--tng-semantic-border-subtle) 70%, transparent);
}

Option overrides

Use optionOverride when the generated preset needs ECharts-specific styling for series, labels, or emphasis states.

Option override

ts
import type { TngChartOptionOverride } from '@tailng-ui/charts';

protected readonly chartOptionOverride: TngChartOptionOverride = (option) => ({
  ...option,
  series: (option['series'] as unknown[] | undefined)?.map((series) => ({
    ...(series as Record<string, unknown>),
    lineStyle: { width: 3 },
    symbolSize: 8,
  })),
});