Components API

Complete reference for all chart components in react-echarts-kit.

LineChart

A responsive line chart component for displaying time series data and trends.

Import

tsx

Basic Usage

tsx

Props

PropTypeDefaultDescription
dataChartData[]-Chart data array
widthnumber400Chart width in pixels
heightnumber300Chart height in pixels
themestring'light'Theme name or custom theme object
smoothbooleanfalseEnable smooth line curves
showAreabooleanfalseShow area fill under line

BarChart

A flexible bar chart component for comparing categorical data.

Import

tsx

Basic Usage

tsx

Props

PropTypeDefaultDescription
dataChartData[]-Chart data array
horizontalbooleanfalseDisplay bars horizontally
stackedbooleanfalseStack multiple series
showValuesbooleanfalseShow values on bars

PieChart

A customizable pie chart component for displaying proportional data.

Import

tsx

Basic Usage

tsx

Props

PropTypeDefaultDescription
dataChartData[]-Chart data array
donutbooleanfalseDisplay as donut chart
innerRadiusnumber0Inner radius for donut charts
showLabelsbooleantrueShow slice labels

AreaChart

An area chart component for visualizing data trends with filled areas.

Import

tsx

Basic Usage

tsx

Props

PropTypeDefaultDescription
dataChartData[]-Chart data array
stackedbooleanfalseStack multiple series
smoothbooleanfalseEnable smooth curves

GaugeChart

A gauge chart component for displaying single values with progress indicators.

Import

tsx

Basic Usage

tsx

Props

PropTypeDefaultDescription
valuenumber-Current gauge value
minnumber0Minimum value
maxnumber100Maximum value
titlestring''Gauge title