ValyroUI English version

Map Chart

Карта мира: хороплет и точки, зум и панорамирование. Pro · Графики и аналитика › Карты и матрицы

Установка

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

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

Пропсы

PropTypeDefault
dataMapChartDatum[][]One value per country; countries without one are drawn as "no data".
markersMapChartMarker[][]Points placed by longitude/latitude over the countries.
colorstring'var(--ui-chart-1)'High end of the color scale; any CSS color. Default --ui-chart-1.
lowColorstringLow end of the color scale. Default: a faint tint of color.
scale'linear' | 'log' | 'sqrt' | 'quantize''linear'linear blends continuously; log and sqrt spread skewed data (populations, traffic) across the ramp; quantize splits the domain into steps equal classes. Default linear.
stepsnumber5Classes of the quantize scale. Default 5.
domain[min: number, max: number]Values mapped to the ends of the scale. Default: the data's minimum and maximum.
valueFormatterValueFormatterFormats values in the tooltip, legend and data table; locale number formatting when omitted.
markerColorstring'var(--ui-chart-3)'Default --ui-chart-3.
heightnumberPlot height in px. Default: the world's aspect ratio at the current width.
zoomablebooleantrueZoom with ⌘/Ctrl + scroll, pinch, double-click, the +/− buttons and keys; drag to pan. Default true.
maxZoomnumber8Default 8.
showLegendbooleantrueColor scale under the map (class ranges or a gradient with ticks) plus the "No data" swatch.
onCountryClick(country: MapChartCountry) => voidClick or Enter on a country.
onMarkerClick(marker: MapChartMarker) => voidClick or Enter on a marker.
localestringBCP 47 locale for country names and numbers. Default: the ThemeProvider locale, then the browser's.
labelsPartial<MapChartLabels>Overrides for the built-in English text; keys left out keep their defaults.
ariaLabel *stringAccessible name of the map (also the caption of its sr-only data tables).

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

  • Heatmap — Тепловые карты
  • Tile Map — Лёгкая карта на тайлах: метки, маршрут, всплывающие карточки, зум
  • Cohort Retention Matrix — Удержание по когортам: тепловая таблица, средние, аномалии и заметки
  • Line Chart — Линейные графики
  • Bar Chart — Столбчатые диаграммы
  • Area Chart — Графики с заливкой
  • Scatter Chart — Точечные и пузырьковые диаграммы с линией тренда
  • Sparkline — Мини-графики
  • Confidence Band Chart — Прогноз с доверительными интервалами и выбросами, точки читаются с клавиатуры
  • Candlestick Chart — Биржевые свечи с объёмами и скользящими средними
  • Donut Chart — Кольцевые диаграммы
  • Treemap — Иерархии площадями с переходом по уровням

Назад: Heatmap · Далее: Tile Map · Весь раздел «Графики и аналитика»