页面搭建

lsf-dev
xielei 2024-09-30 12:23:53 +08:00
parent f6651f9d68
commit a1143b9260
1 changed files with 27 additions and 71 deletions

View File

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