Nested market map

Sectors and companies sized by market cap, coloured by daily change, dark-friendly.

Chart type
Treemap treemap
Tier
Free Core
Collection
Treemap
Render
Live, site theme
View .md Agent setup
LIVE/treemap/nested-market-map6 of 7 in Treemap

Configuration

Raw Standalone
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()