ValyroUI English version

Scatter Chart

Точечные и пузырьковые диаграммы с линией тренда. Pro · Графики и аналитика › Динамика

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add scatter-chart
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ScatterChart } from 'valyro-ui-pro';

Пропсы

PropTypeDefault
series *ScatterSeries<T>[]Groups of points, each in its own color with a legend item; all share the x/y/size fields.
x *keyof T & stringNumeric field for the horizontal position.
y *keyof T & stringNumeric field for the vertical position.
sizekeyof T & stringNumeric field encoded as bubble area (radius ∝ √value) — makes it a bubble chart.
namekeyof T & stringField that names a point in the tooltip and the data table.
xLabelstringAxis titles, drawn at the ends of the axes (also the data table headers, which default to the field keys).
yLabelstringTitle above the y axis; also names y in the tooltip and data table (default there: the y key).
sizeLabelstringNames the size value in the tooltip and data table. Default: the size key.
xFormatterValueFormatterFormats x values in the tooltip; axis ticks keep its units around a shorter number. Default: compact numbers on the axis.
yFormatterValueFormatterFormats y values in the tooltip; axis ticks keep its units around a shorter number. Default: compact numbers on the axis.
sizeFormatterValueFormatterFormats size values in the tooltip and the data table.
maxBubbleSizenumber24Radius of the largest bubble in px (smaller on narrow charts). Default 24.
pointSizenumber4Radius of a point without size. Default 4.
trendLinebooleanfalseDraws a least-squares trend line per series and shows its R² in the legend.
heightnumber300Plot height in px; width follows the container. Default 300.
showGridbooleantrueGrid lines at the x and y ticks; the zero lines are drawn either way.
showLegendbooleanDefault: shown when there is more than one series or a trend line. Click an item to hide its series.
loadingbooleanfalseShows a placeholder of the same height while data loads.
localestringBCP 47 locale for the default number formatting. Default: the ThemeProvider locale, then the browser's.
labelsPartial<ScatterChartLabels>Overrides for the built-in strings.
ariaLabel *stringAccessible name of the chart (also the caption of its sr-only data table).

Похожие компоненты

  • Line Chart — Линейные графики
  • Bar Chart — Столбчатые диаграммы
  • Area Chart — Графики с заливкой
  • Sparkline — Мини-графики
  • Confidence Band Chart — Прогноз с доверительными интервалами и выбросами, точки читаются с клавиатуры
  • Candlestick Chart — Биржевые свечи с объёмами и скользящими средними
  • Donut Chart — Кольцевые диаграммы
  • Treemap — Иерархии площадями с переходом по уровням
  • Funnel Chart — Воронки конверсии
  • Sankey Chart — Диаграммы потоков между этапами
  • Radar Chart — Лепестковые диаграммы для сравнения профилей
  • Heatmap — Тепловые карты

Назад: Area Chart · Далее: Sparkline · Весь раздел «Графики и аналитика»