Treemap-Hervorhebung
Jede Kachel für einen Standort zeigt seinen Online-Anteil innerhalb der ausgeblendeten Gesamtheit; wechseln Sie die Kennzahl über die Schaltflächen.
Diagramm ohne Website-Rahmen öffnen ↗
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "treemap",
toolbar: {
show: false
}
},
series: [
{
name: "Sales",
data: [
{
x: "North 1",
y: 63,
highlight: 22
},
{
x: "North 2",
y: 49,
highlight: 32
},
{
x: "North 3",
y: 32,
highlight: 25
},
{
x: "South 1",
y: 64,
highlight: 33
},
{
x: "South 2",
y: 31,
highlight: 8
},
{
x: "South 3",
y: 68,
highlight: 38
},
{
x: "East 1",
y: 28,
highlight: 19
},
{
x: "East 2",
y: 56,
highlight: 32
},
{
x: "East 3",
y: 55,
highlight: 18
},
{
x: "West 1",
y: 40,
highlight: 21
},
{
x: "West 2",
y: 61,
highlight: 42
},
{
x: "West 3",
y: 50,
highlight: 23
},
{
x: "Central 1",
y: 35,
highlight: 24
},
{
x: "Central 2",
y: 58,
highlight: 13
},
{
x: "Central 3",
y: 90,
highlight: 62
}
]
}
],
plotOptions: {
treemap: {
distributed: true,
enableShades: false
}
},
legend: {
show: false
},
title: {
text: "Store sales, of which online"
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()import WestCoastCharts from 'west-coast-charts'
import types from 'west-coast-charts/types'
import highlightFilter from 'west-coast-charts/features/highlight-filter'
WestCoastCharts.use(types).use(highlightFilter)
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "treemap",
toolbar: {
show: false
}
},
series: [
{
name: "Sales",
data: [
{
x: "North 1",
y: 63,
highlight: 22
},
{
x: "North 2",
y: 49,
highlight: 32
},
{
x: "North 3",
y: 32,
highlight: 25
},
{
x: "South 1",
y: 64,
highlight: 33
},
{
x: "South 2",
y: 31,
highlight: 8
},
{
x: "South 3",
y: 68,
highlight: 38
},
{
x: "East 1",
y: 28,
highlight: 19
},
{
x: "East 2",
y: 56,
highlight: 32
},
{
x: "East 3",
y: 55,
highlight: 18
},
{
x: "West 1",
y: 40,
highlight: 21
},
{
x: "West 2",
y: 61,
highlight: 42
},
{
x: "West 3",
y: 50,
highlight: 23
},
{
x: "Central 1",
y: 35,
highlight: 24
},
{
x: "Central 2",
y: 58,
highlight: 13
},
{
x: "Central 3",
y: 90,
highlight: 62
}
]
}
],
plotOptions: {
treemap: {
distributed: true,
enableShades: false
}
},
legend: {
show: false
},
title: {
text: "Store sales, of which online"
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render() Warten auf das Diagramm.
Open Data & agent view to read this chart through chart.describe().
Aus der laufenden Bibliothek über das optionale agent/describe -Modul gelesen. Text, Tabelle und JSON zeigen denselben Zustand. Ausschließlich Demonstrationsdaten.
$ wcc chart export highlight-filter-highlight-filter-treemap-highlight.json --out highlight-filter-highlight-filter-treemap-highlight.svg --with-table Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Speichern Sie zuerst eine JSON-Spezifikation und prüfen Sie vor dem Rendern die geladene Runtime und die unterstützten Module. Befehlsreferenz
Loading /gallery/highlight-filter/highlight-filter-treemap-highlight/index.md …