Flexible charts that encapsulate the automated layout processing of echarts
npm install flex-chartflex chart




---
sh
npm i flex-chartyarn add flex-chart
echarts is the peerDependence of flex-chart, you can install echarts with your own version.
npm install --save echarts
`$3
- Automatic processing of boundary size layout
- Automatic adjustment of component container layout size change$3
`tsx
import { FlexChart } from "flex-chart";const mockData = [
{
name: "ClothingClothingSalesVolume",
data: [
{name: "shirt", value: 50}, {name: "cardigan", value: 200},
{name: "chiffon-shirt", value: 360}, {name: "trousers", value: 100},
{name: "high-heeled-shoes", value: 100}, {name: "socks", value: 560},
],
},
{
name: "ClothingClothingStock",
data: [
{name: "shirt", value: 20}, {name: "cardigan", value: 90},
{name: "chiffon-shirt", value: 170}, {name: "trousers", value: 30},
{name: "high-heeled-shoes", value: 208}, {name: "socks", value: 120},
],
},
{
name: "ClothingClothingDamage",
data: [
{name: "shirt", value: 50}, {name: "cardigan", value: 230},
{name: "chiffon-shirt", value: 80}, {name: "trousers", value: 101},
{name: "high-heeled-shoes", value: 70}, {name: "socks", value: 302},
],
},
{
name: "ClothingClothingReturn",
data: [
{name: "shirt", value: 37}, {name: "cardigan", value: 113},
{name: "chiffon-shirt", value: 59}, {name: "trousers", value: 91},
{name: "high-heeled-shoes", value: 34}, {name: "socks", value: 207},
],
},
];
function App() {
return (
);
}
``