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-pie-chart

echarts-pie-chart

evilcharts/echarts-pie-chart
FreeComponent

Pie chart component rendered with Apache ECharts

Install it

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

Source

src/registry/charts/echarts-pie-chart.tsxevilcharts.com/r/echarts-pie-chart.json · first 6 KB
1"use client";
2
3import {
4 resolveTooltipPosition,
5 roundnessClass,
6 tooltipIndicatorHtml,
7 tooltipRow,
8 tooltipVariantClass,
9 type TooltipPosition,
10 type TooltipRoundness,
11 type TooltipVariant,
12} from "@/registry/ui/echarts-tooltip";
13import {
14 Children,
15 isValidElement,
16 useCallback,
17 useEffect,
18 useId,
19 useMemo,
20 useRef,
21 useState,
22 type CSSProperties,
23 type FC,
24 type ReactNode,
25} from "react";
26import {
27 buildChartCss,
28 getColorsCount,
29 resolveColors,
30 withAlpha,
31 type ChartConfig,
32 type ResolvedColors,
33} from "@/registry/ui/echarts-chart";
34import { TooltipComponent, type TooltipComponentOption } from "echarts/components";
35import { LegendOverlay, type LegendVariant } from "@/registry/ui/echarts-legend";
36import { PieChart, type PieSeriesOption } from "echarts/charts";
37import { motion, useReducedMotion } from "motion/react";
38import { CanvasRenderer } from "echarts/renderers";
39import type { ComposeOption } from "echarts/core";
40import * as echarts from "echarts/core";
41
42// Re-export the shared types that were previously declared inline here, so
43// existing consumers/examples keep importing them from the chart module.
44export type { ChartConfig, LegendVariant, TooltipPosition, TooltipRoundness, TooltipVariant };
45
46// Modular registration keeps the bundle lean — only the pieces this chart needs.
47// A pie has no coordinate system, so there is no GridComponent and no axes; the
48// tooltip is item-triggered. Never register GraphicComponent: the loading shimmer
49// and selection dim are per-sector itemStyle updates, not graphic overlays.
50echarts.use([PieChart, TooltipComponent, CanvasRenderer]);
51
52type EChartsInstance = ReturnType<typeof echarts.init>;
53
54// The exact option surface this chart uses — a pie series plus the tooltip
55// component. Narrower than echarts' full EChartsOption, so a misspelled key fails
56// the compile instead of silently reaching setOption.
57type EChartsOption = ComposeOption<PieSeriesOption | TooltipComponentOption>;
58
59// Sector paint — structurally assignable to a pie datum's itemStyle. `color`
60// accepts the same solid-or-gradient value sectorPaint returns, and the optional
61// border fields carry the constant-width gap / overlap separator.
62type PieItemStyle = {
63 color: string | echarts.graphic.LinearGradient;
64 opacity: number;
65 borderRadius: number;
66 borderColor?: string;
67 borderWidth?: number;
68};
69
70// … truncated

What it pulls in

npm packages

  • echarts
  • motion

Other registry items

  • @evilcharts/echarts-chart
  • @evilcharts/echarts-tooltip
  • @evilcharts/echarts-legend

Files it writes

  • src/registry/charts/echarts-pie-chart.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-brushecharts-brushEvilChartsComponentsFree1 dep
echarts-chartecharts-chartEvilChartsComponentsFree1 dep
echarts-composed-chartecharts-composed-chartEvilChartsComponentsFree2 deps
echarts-dotecharts-dotEvilChartsComponentsFree1 dep
echarts-legendecharts-legendEvilChartsComponentsFreeno deps
echarts-line-chartecharts-line-chartEvilChartsComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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. Changelog

BlockDex