diff --git a/CHANGELOG.md b/CHANGELOG.md index 10f494aa..44f81fc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -# 3.1.0-beta.6 (1.07, 2017) +# 3.1.1 (1.18, 2017) +- update g2 3.0.4-beta.4. +- when data=null show g2 axis. + +# 3.1.0 (1.07, 2017) the release version which compate react16. # 3.1.0-beta.6 (12.29, 2017) diff --git a/package.json b/package.json index e9c56344..6b7e6ff4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bizcharts", - "version": "3.1.0", + "version": "3.1.1", "description": "A powerful React chart library based G2 for browser", "main": "umd/BizCharts.js", "browser": "umd/BizCharts.js", @@ -53,7 +53,7 @@ "react": "^15.0.0 || ^16.0.0" }, "dependencies": { - "@antv/g2": "3.0.4-beta.2", + "@antv/g2": "3.0.4-beta.4", "invariant": "^2.2.2", "warning": "^3.0.0", "prop-types": "^15.6.0" diff --git a/src/components/Chart/index.jsx b/src/components/Chart/index.jsx index 64bb75b7..f9ecb600 100644 --- a/src/components/Chart/index.jsx +++ b/src/components/Chart/index.jsx @@ -8,14 +8,10 @@ import PureChart from './purechart'; import Empty from './empty'; function hasSource(source) { - let flag; + let flag = true; if (source == null) { flag = false; - } else if (Util.isArray(source)) { - flag = source[0]; - } else { - flag = true; } return !!flag; @@ -43,9 +39,13 @@ export default class Chart extends (React.PureComponent || React.Component) { const { data, width, height, placeholder, className, style } = this.props; return (