diff --git a/src/components/Charts/index.js b/src/components/Charts/index.js index cacedbce496cd2b4c1ddc986c68a817b9bdc094c..78863fabdb7615138baf2063f1c4ed13285abade 100644 --- a/src/components/Charts/index.js +++ b/src/components/Charts/index.js @@ -13,7 +13,7 @@ import WaterWave from './WaterWave'; import TagCloud from './TagCloud'; import TimelineChart from './TimelineChart'; -const yuan = val => `¥ ${numeral(val).format('0,0')}`; +const yuan = val => `¥ ${numeral(val).format('0,0')}`; const Charts = { yuan, diff --git a/src/routes/Dashboard/Analysis.js b/src/routes/Dashboard/Analysis.js index 0d2d09b908cc1501638dc4c7e8f9d5a5f3c29df8..5e691e423ecb8d81a950f03ae30836e71e279000 100644 --- a/src/routes/Dashboard/Analysis.js +++ b/src/routes/Dashboard/Analysis.js @@ -42,6 +42,10 @@ for (let i = 0; i < 7; i += 1) { }); } +const Yuan = ({ children }) => ( + /* eslint-disable-line react/no-danger */ +); + @connect(({ chart, loading }) => ({ chart, loading: loading.effects['chart/fetch'], @@ -252,7 +256,7 @@ export default class Analysis extends Component { } - total={() => } + total={() => 126560} footer={} contentHeight={46} > @@ -451,15 +455,11 @@ export default class Analysis extends Component { ( - now.y + pre, 0)), - }} - /> - )} + total={ + () => {salesPieData.reduce((pre, now) => now.y + pre, 0)} + } data={salesPieData} - valueFormat={val => } + valueFormat={value => {value}} height={248} lineWidth={4} />