Nested market map
Sectors and companies sized by market cap, coloured by daily change, dark-friendly.
Open the chart without page chrome ↗
const options = {
chart: {
height: 460,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "treemap",
toolbar: {
show: false
}
},
series: [
{
name: "Cap",
data: [
{
x: "Technology",
children: [
{
x: "Nimbus",
y: 66,
growth: -0.3
},
{
x: "Quark",
y: 74,
growth: 0.2
},
{
x: "Helix",
y: 228,
growth: 1.1
},
{
x: "Arcade",
y: 102,
growth: -1.2
},
{
x: "Lumen",
y: 160,
growth: -1.7
}
]
},
{
x: "Health",
children: [
{
x: "Medica",
y: 320,
growth: 6.1
},
{
x: "Vitae",
y: 71,
growth: -1.4
},
{
x: "Pulse",
y: 88,
growth: -3.8
}
]
},
{
x: "Energy",
children: [
{
x: "Volt",
y: 155,
growth: 4.3
},
{
x: "Tidal",
y: 177,
growth: -0.6
},
{
x: "Ember",
y: 319,
growth: -3
}
]
},
{
x: "Finance",
children: [
{
x: "Ledger",
y: 56,
growth: -1.3
},
{
x: "Vault",
y: 206,
growth: -0.8
},
{
x: "Mint",
y: 56,
growth: -1.9
},
{
x: "Harbor",
y: 361,
growth: 0.3
}
]
},
{
x: "Retail",
children: [
{
x: "Basket",
y: 252,
growth: 2.2
},
{
x: "Aisle",
y: 217,
growth: 0.2
}
]
}
]
}
],
plotOptions: {
treemap: {
colorScale: {
colorValue: "growth",
gradientLegend: {
formatter: (v) => (v > 0 ? '+' : '') + v.toFixed(1) + '%'
}
},
dataLabels: {
showValue: false
}
}
},
title: {
text: "Market map: size = cap, colour = daily change"
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()import WestCoastCharts from 'west-coast-charts'
const options = {
chart: {
height: 460,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "treemap",
toolbar: {
show: false
}
},
series: [
{
name: "Cap",
data: [
{
x: "Technology",
children: [
{
x: "Nimbus",
y: 66,
growth: -0.3
},
{
x: "Quark",
y: 74,
growth: 0.2
},
{
x: "Helix",
y: 228,
growth: 1.1
},
{
x: "Arcade",
y: 102,
growth: -1.2
},
{
x: "Lumen",
y: 160,
growth: -1.7
}
]
},
{
x: "Health",
children: [
{
x: "Medica",
y: 320,
growth: 6.1
},
{
x: "Vitae",
y: 71,
growth: -1.4
},
{
x: "Pulse",
y: 88,
growth: -3.8
}
]
},
{
x: "Energy",
children: [
{
x: "Volt",
y: 155,
growth: 4.3
},
{
x: "Tidal",
y: 177,
growth: -0.6
},
{
x: "Ember",
y: 319,
growth: -3
}
]
},
{
x: "Finance",
children: [
{
x: "Ledger",
y: 56,
growth: -1.3
},
{
x: "Vault",
y: 206,
growth: -0.8
},
{
x: "Mint",
y: 56,
growth: -1.9
},
{
x: "Harbor",
y: 361,
growth: 0.3
}
]
},
{
x: "Retail",
children: [
{
x: "Basket",
y: 252,
growth: 2.2
},
{
x: "Aisle",
y: 217,
growth: 0.2
}
]
}
]
}
],
plotOptions: {
treemap: {
colorScale: {
colorValue: "growth",
gradientLegend: {
formatter: (v) => (v > 0 ? '+' : '') + v.toFixed(1) + '%'
}
},
dataLabels: {
showValue: false
}
}
},
title: {
text: "Market map: size = cap, colour = daily change"
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render() Waiting for the chart.
Open Data & agent view to read this chart through chart.describe().
Read from the running library through its optional agent/describe module. Text, table and JSON share the same snapshot. Demo data only.
$ wcc chart export treemap-nested-market-map.json --out treemap-nested-market-map.svg --with-table Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Save a JSON spec first and check the loaded runtime and supported modules before rendering. Command reference
Loading /gallery/treemap/nested-market-map/index.md …