# echarts 图表

# 介绍

官方网址:https://echarts.apache.org/zh/index.html (opens new window)

作为一款知名的图表插件,大家应该都不陌生,最近其版本升级到了 5+, 增加了许多新特性,交互上也做了很多优化,底层实现也做了大量优化,还是很推荐使用的。

# 使用

因为目前项目中只在影视评分分布处使用了 echarts,所以采用了按需引入的方式,减少打包体积。

import * as echarts from "echarts/core";
import { LineChart } from "echarts/charts";
import {
	GridComponent,
	TooltipComponent,
	LegendComponent,
} from "echarts/components";
import { CanvasRenderer } from "echarts/renderers";

echarts.use([
	LineChart,
	GridComponent,
	TooltipComponent,
	LegendComponent,
	CanvasRenderer,
]);
上次更新: 6/24/2022, 6:15:24 PM
示例展示,因PC端无touch事件,请在手机上进行浏览