← All Components
<mth-chart-series>
Declarative chart data series child element for <mth-chart>, supporting all 19 ECharts visualization types (line, bar, area, pie, donut, scatter, bubble, heatmap, treemap, sunburst, sankey, radar, gauge, funnel, candlestick, histogram, boxplot, graph, choropleth).
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-chart-series>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/charts/chart-series"></script>
<mth-chart-series type="line" x-axis-index="0">Example</mth-chart-series>import '@methane-ui/charts/chart-series';
import '@methane-ui/react';
export function Example() {
return <mth-chart-series type="line" x-axis-index="0">Example</mth-chart-series>;
}<script setup lang="ts">
import '@methane-ui/charts/chart-series';
</script>
<template>
<mth-chart-series type="line" x-axis-index="0">Example</mth-chart-series>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/charts/chart-series';
import { MthChartSeriesDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthChartSeriesDirective],
template: `<mth-chart-series type="line" x-axis-index="0">Example</mth-chart-series>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/charts/chart-series';
import MthChartSeries from '@methane-ui/svelte/MthChartSeries.svelte';
</script>
<MthChartSeries type="line" x-axis-index="0">Example</MthChartSeries>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
name | name | string | "" | Series display name shown in legend and tooltips. |
type | type | unknown | "line" | One of the 19 supported chart visualization types. |
dataJson | data-json | string | "" | JSON-encoded data array attribute for declarative HTML usage. |
data | — | ReadonlyArray<unknown> | — | Structured JS series data array. |
stack | stack | string | "" | Optional stacking group key for bar/line/area charts. |
color | color | string | "" | Optional explicit series color token or CSS color. |
smooth | smooth | boolean | false | Applies curve smoothing to line and area series. |
hidden | hidden | boolean | false | Hides the series from rendering while keeping its definition. |
xAxisIndex | x-axis-index | number | 0 | Target X-axis index for multi-axis charts. |
yAxisIndex | y-axis-index | number | 0 | Target Y-axis index for multi-axis charts. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-series-change | { name: string; type: unknown } | Emitted when series data or configuration updates. |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="none". | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| states | Exposes ElementInternals CustomStateSet flags: :state(hidden). | Conformance suite |
| i18n | Routes 1 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |