Treemap highlight

Each store tile shows its online part inside the faded whole; switch the measure with the buttons.

Chart type
Treemap treemap
Tier
Free Core
Collection
Highlight filter
Render
Live, site theme
View .md Agent setup
LIVE/highlight-filter/treemap-highlight9 of 23 in Highlight & filter

Configuration

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