BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/EvilCharts/echarts-brush

echarts-brush

evilcharts/echarts-brush
FreeComponent

EvilCharts publishes no description for this item.

Install it

npx shadcn@latest add https://evilcharts.com/r/echarts-brush.json

Source

src/registry/ui/echarts-brush.tsxevilcharts.com/r/echarts-brush.json · first 6 KB
1import { withAlpha, type ResolvedColors } from "@/registry/ui/echarts-chart";
2import type { DataZoomComponentOption } from "echarts/components";
3import type { FC } from "react";
4import * as echarts from "echarts/core";
5
6type EChartsInstance = ReturnType<typeof echarts.init>;
7
8const BRUSH_BORDER_OPACITY = 1; // brush frame, × border alpha (evil-brush uses the full token)
9
10export { BRUSH_BORDER_OPACITY };
11
12// ─────────────────────────────────────────────────────────────────────────────
13// Brush marker — the declarative `<Chart.Brush/>` child. Rendering nothing, its
14// PRESENCE turns the brush on (replacing the old showBrush prop) and its props
15// carry the brush's height, handle-label formatter, and range callback. Shared
16// so every cartesian chart attaches the SAME component to its root.
17// ─────────────────────────────────────────────────────────────────────────────
18
19export interface BrushProps {
20 height?: number; // brush preview strip height in px (default 56)
21 formatLabel?: (value: string, index: number) => string; // formats the range-handle labels
22 onChange?: (range: { startIndex: number; endIndex: number }) => void; // fires as the range moves
23}
24
25/** Declares the zoom brush below the chart. Presence renders it; renders nothing itself. */
26export const Brush: FC<BrushProps> = () => null;
27
28// ─────────────────────────────────────────────────────────────────────────────
29// Brush overlays — the evil-brush look: a rounded border around the SELECTED
30// range, dimmed unselected sides, centered grip-dot handle pills, and range
31// label pills below the frame. None of that is a dataZoom capability. They are
32// raw zrender elements updated imperatively — routing them through setOption
33// re-renders the dataZoom component mid-drag, resetting its drag anchor (the
34// handle progressively lags the pointer).
35// … truncated

What it pulls in

npm packages

  • echarts

Other registry items

  • @evilcharts/echarts-chart

Files it writes

  • src/registry/ui/echarts-brush.tsx

Facts

Registry
EvilCharts
Type
registry:component
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

evilcharts.com legions-developer/evilcharts on GitHub Raw registry item This item as JSON

More from EvilCharts

All 271 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
echarts-area-chartecharts-area-chartEvilChartsComponentsFree2 deps
echarts-bar-chartecharts-bar-chartEvilChartsComponentsFree2 deps
echarts-chartecharts-chartEvilChartsComponentsFree1 dep
echarts-composed-chartecharts-composed-chartEvilChartsComponentsFree2 deps
echarts-dotecharts-dotEvilChartsComponentsFree1 dep
echarts-legendecharts-legendEvilChartsComponentsFreeno deps
echarts-line-chartecharts-line-chartEvilChartsComponentsFree2 deps
echarts-pie-chartecharts-pie-chartEvilChartsComponentsFree2 deps
BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex