Area Chart

塗りつぶした領域で描く系列。重ねても積み上げてもよく、折れ線グラフの軸、凡例、ツールチップ、ロービングフォーカス、非表示のデータテーブルを備えます。

対応フレームワーク
  • Angular: 対応
  • Vue: 対応
  • React: 対応
  • React Native: 対応

使い方

  • Mobile
  • Desktop
Visitors, January to June 2026
MonthMobileDesktop
Jan80186
Feb200305
Mar120237
Apr19073
May130209
Jun140214

インポート

ts
import {
  SoneAreaChartComponent,
} from "@surface-one/angular/area-chart";

API リファレンス

SoneAreaChartComponentコンポーネント

`<sone-area-chart>` — series drawn as filled areas (shadcn/ui Area Chart): a `<sone-line-chart area>` with the same data, axis, legend, tooltip, roving focus and hidden data table. `stacked` piles the series on one another, each filling down to the one below; otherwise every area fills down to zero.

セレクター
sone-area-chart
入力
名前型 デフォルト
data

The rows, left to right: each holds the x value (`xKey`) and one value per series.

readonly T[][]
series

The series: `{ key, label, tone }`, `key` naming the row property of its values.

readonly SoneLineChartSeries[][]
xKey

The row property of the x value.

string"x"
xScale

`category` — evenly spaced; `time` — spaced by date (`Date`, epoch ms or ISO string).

SoneLineChartXScale"category"
xFormat

The label of an x value (axis, tooltip, table); default: the text, or a short date.

SoneLineChartXFormat | nullnull
xTicks

At most this many x-axis labels (stepped back from the last one); 0 hides the axis.

number6
yTicks

About this many value-axis steps.

number4
yMin

The bottom of the value axis; default: 0, or the lowest value when negative.

number | nullnull
yMax

The top of the value axis; default: a round step above the highest (stacked) value.

number | nullnull
height

The plot height in CSS pixels (the x labels sit below it).

number200
curve

`linear` — straight segments; `smooth` — a monotone curve.

SoneLineChartCurve"linear"
stacked

Stacks the series, each filling down to the one below.

booleanfalse
dots

Draws a dot on every value (the hovered or focused x value always shows its dots).

booleanfalse
legend

Shows the legend under the plot.

booleantrue
ariaLabel

Names the chart and captions its data table.

string""
valueFormat

Formats values on the axis, in the tooltip and in the data table.

SoneLineChartFormatdefaultFormat
categoryHeader

The data table's category column header.

—$localize`Category`