Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hm.hm committed Jan 18, 2018
2 parents 7d6597d + 344316d commit b5daf1f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions src/components/Chart/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -43,9 +39,13 @@ export default class Chart extends (React.PureComponent || React.Component) {
const { data, width, height, placeholder, className, style } = this.props;
return (<div className={className} style={style}>
{
(hasSource(data) || this.hasViewSource()) ?
(hasSource(data) || this.hasViewSource() || !(placeholder === true)) ?
<PureChart ref={this._refCallback} {...this.props} /> :
<Empty width={width} height={height} placeholder={placeholder} />
<Empty
width={width}
height={height}
placeholder={placeholder === true ? undefined : placeholder}
/>
}
</div>);
}
Expand Down
6 changes: 1 addition & 5 deletions src/processor/configMerge.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@

import { Util } from '../shared';

const notViewSelfProps = ['axises', 'coord', 'geoms', 'guide', 'children'];

const deleteFuncMap = {
Chart: 'deleteChart',
Coord: 'deleteCoord',
Expand Down Expand Up @@ -73,7 +69,7 @@ const iMerge = {
},

deleteLabel(config, id, parentId) {
if (!config || !config.geoms) return;
if (!config || !config.geoms || !config.geoms[parentId]) return;

delete config.geoms[parentId].label;
},
Expand Down
1 change: 0 additions & 1 deletion src/processor/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default class Processor {
constructor() {
this.config = {};
this.elementInfos = {};
this.idToName = {};
this.added = false;
this.initedG2 = false;
this.updated = false;
Expand Down

0 comments on commit b5daf1f

Please sign in to comment.