@jimengio/echarts-autofit
Advanced tools
Comparing version 0.1.0-a1 to 0.1.0
@@ -12,3 +12,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import { css, cx } from "emotion"; | ||
import echarts from "echarts"; | ||
import isEqual from "lodash/isEqual"; | ||
@@ -87,3 +86,3 @@ /** 取整... */ | ||
return __awaiter(this, void 0, void 0, function* () { | ||
// let echarts = (await import(/* webpackChunkName: "echarts" */ "echarts")).default; | ||
let echarts = (yield import(/* webpackChunkName: "echarts" */ "echarts")).default; | ||
this._chart = echarts.init(this._chartElement, null, { renderer: this.props.renderer }); | ||
@@ -107,3 +106,3 @@ this._chart.setOption(this.props.options, this.props.notMergeOption); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
// let echarts = (await import(/* webpackChunkName: "echarts" */ "echarts")).default; | ||
let echarts = (yield import(/* webpackChunkName: "echarts" */ "echarts")).default; | ||
if (!this.props.resizeDisabled) { | ||
@@ -110,0 +109,0 @@ window.removeEventListener("resize", this.debouncedOnWindowResize); |
{ | ||
"name": "@jimengio/echarts-autofit", | ||
"version": "0.1.0-a1", | ||
"version": "0.1.0", | ||
"description": "", | ||
@@ -17,3 +17,3 @@ "main": "./lib/index.js", | ||
"compile": "tsc -d --project tsconfig-compile.json --outDir lib/", | ||
"upload": "rsync -avr --progress dist/ fe.jimu.io:~/repo/jimengio/ts-workflow", | ||
"upload": "rsync -avr --progress dist/ fe.jimu.io:~/repo/jimengio/echarts-autofit", | ||
"gen-router": "webpack --config webpack/router-config.js && node dist/gen-router.js", | ||
@@ -20,0 +20,0 @@ "postinstall": "rm -rfv node_modules/@types/*/node_modules/@types/react" |
@@ -5,10 +5,17 @@ ## ECharts Autofit | ||
Demo http://fe.jimu.io/echarts-autofit/ | ||
### Usage | ||
``` | ||
![](https://img.shields.io/npm/v/@jimengio/echarts-autofit.svg?style=flat-square) | ||
Notice, create a container element to define the width/height for the chart! | ||
```jsx | ||
import EChartAutofit from "@jimengio/echarts-autofit"; | ||
<div className={styleArea}> | ||
<EChartAutofit options={chartOptions} /> | ||
</div> | ||
</div>; | ||
let styleArea = css` | ||
@@ -15,0 +22,0 @@ margin-top: 100px; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
25179
35
456