Klar

Charts / React finance charts / Hierarchy

Market treemap

Every stock in an index as a tile sized by market cap and coloured by its daily move, grouped into sectors with their weighted change.

React component MarketTreemap, data through props. Trees and nesting: treemaps, call stacks, clusters. Tags: treemap, market-map, sectors, stocks, market-cap, heatmap.

Install

npm i klar-charts

import 'klar-charts/styles.css'
import { ThemeScope, MarketTreemap } from 'klar-charts'

# or copy the source:
npx shadcn@latest add https://klar.run/r/fin-treemap.json

Usage

<MarketTreemap className="mt-4" data={marketMap} height={520} />

Related market treemap charts