-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from mayinrain/master
upd: 打包问题修复
- Loading branch information
Showing
4 changed files
with
25 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
// 引入 echarts 核心模块,核心模块提供了 echarts 使用必须要的接口。 | ||
import * as echarts from 'echarts/core'; | ||
// 引入柱状图图表,图表后缀都为 Chart | ||
import { BarChart, LineChart } from 'echarts/charts'; | ||
import * as charts from 'echarts/charts'; | ||
// 引入 Canvas 渲染器,注意引入 CanvasRenderer 或者 SVGRenderer 是必须的一步 | ||
import { CanvasRenderer } from 'echarts/renderers'; | ||
import * as renderers from 'echarts/renderers'; | ||
// 引入提示框,标题,直角坐标系,数据集,内置数据转换器组件,组件后缀都为 Component | ||
import { | ||
TooltipComponent, | ||
GridComponent, | ||
DataZoomComponent, | ||
LegendComponent, | ||
} from 'echarts/components'; | ||
import * as components from 'echarts/components'; | ||
|
||
const { BarChart } = charts; | ||
const { CanvasRenderer } = renderers; | ||
const { TooltipComponent, GridComponent, DataZoomComponent, LegendComponent } = components; | ||
// 注册必须的组件 | ||
echarts.use([ | ||
BarChart, | ||
LineChart, | ||
CanvasRenderer, | ||
TooltipComponent, | ||
GridComponent, | ||
DataZoomComponent, | ||
LegendComponent, | ||
BarChart, | ||
CanvasRenderer | ||
]); | ||
|
||
export default echarts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters