Commit 56fe9935 by zhaochengxiang

雷达度选中维度高亮

parent 2223d144
......@@ -381,7 +381,7 @@ class Dashboard extends Component {
</Row>
<Row className="border-bottom border-light infoContentItem">
<Col md={12}>
<div>所属自律互助小组</div>
<div>诚信互助小组</div>
<div className="text-primary">{data.custTOSDMAG||''}</div>
</Col>
<Col md={12}>
......
......@@ -3,9 +3,25 @@ import {
ResponsiveContainer, RadarChart, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar, Tooltip} from "recharts";
class Basic extends React.Component {
constructor(props) {
super(props);
this.state = {
tickIndex: 0
};
}
render() {
const { tickIndex } = this.state;
const _data = this.props.data;
const Tick = (props) => {
const { x, y, textAnchor } = props;
const { value, index } = props.payload;
return <text x={x} y={y} textAnchor={textAnchor} fill={ (tickIndex===index)?'#4091b0':'#000'} >{value}</text>;
};
var gfdLevel,yjdLevel,phdLevel,czdLevel,cxdLevel;
gfdLevel = (parseFloat(_data.modelGFD) >= 1)?'A':'B';
......@@ -51,7 +67,8 @@ class Basic extends React.Component {
>
<Tooltip isAnimationActive={false} />
<PolarGrid />
<PolarAngleAxis dataKey="item" onClick={e=>{
<PolarAngleAxis tick={<Tick />} dataKey="item" onClick={e=>{
this.setState({ tickIndex: e.index });
this.props.onSelect && this.props.onSelect(e.index)
}}/>
<PolarRadiusAxis
......
......@@ -391,7 +391,7 @@ class mDashboard extends Component {
</Row>
<Row className="border-bottom border-light infoContentItem">
<Col span={12}>
<div>所属自律互助小组</div>
<div>诚信互助小组</div>
<div className="text-primary">{data.custTOSDMAG||''}</div>
</Col>
<Col span={12}>
......
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