Commit 013247c6 authored by niko's avatar niko Committed by ddcat1115

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

parent 135735b7
...@@ -131,7 +131,16 @@ class TagCloud extends Component { ...@@ -131,7 +131,16 @@ class TagCloud extends Component {
ref={this.saveRootRef} ref={this.saveRootRef}
> >
{dv && ( {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" /> <Coord reflect="y" />
<Geom type="point" position="x*y" color="text" shape="cloud" /> <Geom type="point" position="x*y" color="text" shape="cloud" />
</Chart> </Chart>
......
import numeral from 'numeral'; import numeral from 'numeral';
import './g2';
import ChartCard from './ChartCard'; import ChartCard from './ChartCard';
import Bar from './Bar'; import Bar from './Bar';
import Pie from './Pie'; import Pie from './Pie';
......
...@@ -2,7 +2,6 @@ import '@babel/polyfill'; ...@@ -2,7 +2,6 @@ import '@babel/polyfill';
import dva from 'dva'; import dva from 'dva';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import FastClick from 'fastclick'; import FastClick from 'fastclick';
import './g2';
import './rollbar'; import './rollbar';
import onError from './error'; import onError from './error';
// import browserHistory from 'history/createBrowserHistory'; // import browserHistory from 'history/createBrowserHistory';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment