页面搭建
parent
f6651f9d68
commit
a1143b9260
|
|
@ -23,92 +23,48 @@ const Page = ({ title = '标题' }) => {
|
||||||
const [sumTotal, setSum] = useState(0)
|
const [sumTotal, setSum] = useState(0)
|
||||||
|
|
||||||
const getPlanOption = useMemo((name, data) => {
|
const getPlanOption = useMemo((name, data) => {
|
||||||
// let total = 0
|
|
||||||
// for (let i = 0; i < data.length; i++) {
|
|
||||||
// total = total + Number(data[i].value)
|
|
||||||
// }
|
|
||||||
return {
|
return {
|
||||||
legend: {
|
legend: {
|
||||||
data: Object.values(obj),
|
data: Object.values(obj),
|
||||||
type:'scroll'
|
type: 'scroll'
|
||||||
|
},
|
||||||
|
tooltip: {},
|
||||||
|
polar: {
|
||||||
|
radius: [0, '80%']
|
||||||
|
},
|
||||||
|
radiusAxis: {
|
||||||
|
min: 0,
|
||||||
|
max: Math.max.apply(null, Object.values(plandata)),
|
||||||
|
axisLine:{
|
||||||
|
show:false
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
angleAxis: {
|
angleAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Object.values(obj)
|
data: Object.values(obj),
|
||||||
|
// startAngle: 75,
|
||||||
},
|
},
|
||||||
tooltip: {},
|
|
||||||
// radar: [
|
|
||||||
// {
|
|
||||||
// indicator: [
|
|
||||||
// { text: '' },
|
|
||||||
// { text: '' },
|
|
||||||
// { text: '' },
|
|
||||||
// { text: '' },
|
|
||||||
// { text: '' },
|
|
||||||
// { text: '' },
|
|
||||||
// { text: '' },
|
|
||||||
// ],
|
|
||||||
// radius: '80%',
|
|
||||||
// splitNumber: 12,
|
|
||||||
// shape: 'circle',
|
|
||||||
// splitArea: {
|
|
||||||
// areaStyle: {
|
|
||||||
// color: '#fff',
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// axisLine: {
|
|
||||||
// lineStyle: {
|
|
||||||
// color: '#d4d4d4'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
radiusAxis: {
|
|
||||||
min: 0,
|
|
||||||
max: 20,
|
|
||||||
interval: 2,
|
|
||||||
// 刻度
|
|
||||||
axisTick: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
//刻度数值
|
|
||||||
axisLabel: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
// 线
|
|
||||||
axisLine: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
},
|
|
||||||
polar: {},
|
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name:'案件类型',
|
name: '案件类型',
|
||||||
stack: 'a',
|
type: 'bar',
|
||||||
type: 'pie',
|
coordinateSystem: 'polar',
|
||||||
center: ['50%', '50%'],
|
itemStyle: {
|
||||||
selectedOffset: 0,
|
|
||||||
radius: [0, 140],
|
|
||||||
roseType: 'area',
|
|
||||||
itemStyle: { //去除饼图的指示折线label
|
|
||||||
normal: {
|
normal: {
|
||||||
label: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
borderRadius: 8,
|
|
||||||
color: function (colors) {
|
color: function (colors) {
|
||||||
var colorList = [
|
var colorList = [
|
||||||
'#5b8ff9',
|
'#5b8ff9',
|
||||||
'#5ad8a6',
|
'#5ad8a6',
|
||||||
'#5d7092',
|
'#5d7092',
|
||||||
'#f6bd16',
|
'#f6bd16',
|
||||||
'#6f5ef9',
|
'#6f5ef9',
|
||||||
];
|
];
|
||||||
return colorList[colors.dataIndex];
|
return colorList[colors.dataIndex];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: plandata
|
data: Object.values(plandata)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue