Commit 7126de92 authored by jim's avatar jim Committed by 陈帅

getLengendData => getLegendData

parent 5fd9f36c
...@@ -19,7 +19,7 @@ export default class Radar extends Component { ...@@ -19,7 +19,7 @@ export default class Radar extends Component {
componentDidUpdate(preProps) { componentDidUpdate(preProps) {
if (this.props.data !== preProps.data) { if (this.props.data !== preProps.data) {
this.getLengendData(); this.getLegendData();
} }
} }
...@@ -28,7 +28,7 @@ export default class Radar extends Component { ...@@ -28,7 +28,7 @@ export default class Radar extends Component {
}; };
// for custom lengend view // for custom lengend view
getLengendData = () => { getLegendData = () => {
if (!this.chart) return; if (!this.chart) return;
const geom = this.chart.getAllGeoms()[0]; // 获取所有的图形 const geom = this.chart.getAllGeoms()[0]; // 获取所有的图形
const items = geom.get('dataArray') || []; // 获取图形对应的 const items = geom.get('dataArray') || []; // 获取图形对应的
......
...@@ -47,3 +47,18 @@ export { ...@@ -47,3 +47,18 @@ export {
TagCloud, TagCloud,
TimelineChart, TimelineChart,
}; };
export default {
yuan,
Bar,
Pie,
Gauge,
Radar,
MiniBar,
MiniArea,
MiniProgress,
ChartCard,
Field,
WaterWave,
TagCloud,
TimelineChart,
};
...@@ -3,16 +3,16 @@ import { Link } from 'dva/router'; ...@@ -3,16 +3,16 @@ import { Link } from 'dva/router';
import PageHeader from '../components/PageHeader'; import PageHeader from '../components/PageHeader';
import GridContent from './GridContent'; import GridContent from './GridContent';
import styles from './PageHeaderLayout.less'; import styles from './PageHeaderLayout.less';
import MeunContext from './MeunContext'; import MenuContext from './MeunContext';
export default ({ children, wrapperClassName, top, ...restProps }) => ( export default ({ children, wrapperClassName, top, ...restProps }) => (
<div style={{ margin: '-24px -24px 0' }} className={wrapperClassName}> <div style={{ margin: '-24px -24px 0' }} className={wrapperClassName}>
{top} {top}
<MeunContext.Consumer> <MenuContext.Consumer>
{value => { {value => {
return <PageHeader {...value} key="pageheader" {...restProps} linkElement={Link} />; return <PageHeader {...value} key="pageheader" {...restProps} linkElement={Link} />;
}} }}
</MeunContext.Consumer> </MenuContext.Consumer>
{children ? ( {children ? (
<div className={styles.content}> <div className={styles.content}>
<GridContent>{children}</GridContent> <GridContent>{children}</GridContent>
......
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