Area highlight

Legend hover highlights one area.

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

Configuration

Raw Standalone
const options = {
  chart: {
    height: 380,
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "area",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "North",
      data: [38, 36, 36, 38, 37, 40, 39, 41, 39, 42, 42, 40, 42, 42, 43, 45, 48, 49, 48, 50, 49, 51, 52, 54]
    },
    {
      name: "South",
      data: [43, 43, 45, 42, 42, 45, 45, 43, 44, 42, 44, 44, 44, 47, 49, 51, 53, 54, 54, 53, 52, 55, 54, 55]
    },
    {
      name: "East",
      data: [42, 45, 45, 43, 46, 47, 45, 46, 46, 48, 50, 51, 51, 54, 54, 52, 50, 48, 49, 46, 45, 44, 46, 49]
    }
  ],
  legend: {
    onItemHover: {
      highlightDataSeries: true
    }
  },
  fill: {
    opacity: 0.25
  },
  stroke: {
    width: 2
  },
  title: {
    text: "Energy use by grid zone"
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}

const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()