Browse Source

fixed charts colors & import default g2 config in charts (#567)

pull/586/head
niko 8 years ago
committed by ddcat1115
parent
commit
013247c6a8
  1. 11
      src/components/Charts/TagCloud/index.js
  2. 0
      src/components/Charts/g2.js
  3. 1
      src/components/Charts/index.js
  4. 1
      src/index.js

11
src/components/Charts/TagCloud/index.js

@ -131,7 +131,16 @@ class TagCloud extends Component {
ref={this.saveRootRef}
>
{dv && (
<Chart width={w} height={h} data={dv} padding={0}>
<Chart
width={w}
height={h}
data={dv}
padding={0}
scale={{
x: { nice: false },
y: { nice: false },
}}
>
<Coord reflect="y" />
<Geom type="point" position="x*y" color="text" shape="cloud" />
</Chart>

0
src/g2.js → src/components/Charts/g2.js

1
src/components/Charts/index.js

@ -1,4 +1,5 @@
import numeral from 'numeral';
import './g2';
import ChartCard from './ChartCard';
import Bar from './Bar';
import Pie from './Pie';

1
src/index.js

@ -2,7 +2,6 @@ import '@babel/polyfill';
import dva from 'dva';
import 'moment/locale/zh-cn';
import FastClick from 'fastclick';
import './g2';
import './rollbar';
import onError from './error';
// import browserHistory from 'history/createBrowserHistory';

Loading…
Cancel
Save