Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-chart-series>

@methane-ui/charts~6.8 KB brotli shell + lazy engine~1.4 KB shell · lazy engine chunk

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

Interactive StageLive Custom Element · <mth-chart-series> (@methane-ui/charts)
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>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
namenamestring""Series display name shown in legend and tooltips.
typetypeunknown"line"One of the 19 supported chart visualization types.
dataJsondata-jsonstring""JSON-encoded data array attribute for declarative HTML usage.
data—ReadonlyArray<unknown>—Structured JS series data array.
stackstackstring""Optional stacking group key for bar/line/area charts.
colorcolorstring""Optional explicit series color token or CSS color.
smoothsmoothbooleanfalseApplies curve smoothing to line and area series.
hiddenhiddenbooleanfalseHides the series from rendering while keeping its definition.
xAxisIndexx-axis-indexnumber0Target X-axis index for multi-axis charts.
yAxisIndexy-axis-indexnumber0Target Y-axis index for multi-axis charts.

Events

EventDetail TypeDescription
mth-series-change{ name: string; type: unknown }Emitted when series data or configuration updates.

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusFocus ownership matches focusModel="none".lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
statesExposes ElementInternals CustomStateSet flags: :state(hidden).Conformance suite
i18nRoutes 1 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test