页面搭建

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 [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'
}, },
angleAxis: {
type: 'category',
data: Object.values(obj)
},
tooltip: {}, tooltip: {},
// radar: [ polar: {
// { radius: [0, '80%']
// indicator: [ },
// { text: '' },
// { text: '' },
// { text: '' },
// { text: '' },
// { text: '' },
// { text: '' },
// { text: '' },
// ],
// radius: '80%',
// splitNumber: 12,
// shape: 'circle',
// splitArea: {
// areaStyle: {
// color: '#fff',
// }
// },
// axisLine: {
// lineStyle: {
// color: '#d4d4d4'
// }
// },
// },
// ],
radiusAxis: { radiusAxis: {
min: 0, min: 0,
max: 20, max: Math.max.apply(null, Object.values(plandata)),
interval: 2,
// 刻度
axisTick: {
show: false
},
//刻度数值
axisLabel: {
show: false
},
// 线
axisLine:{ axisLine:{
show:false show:false
}, },
},
angleAxis: {
type: 'category',
data: Object.values(obj),
// startAngle: 75,
}, },
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',
@ -108,7 +64,7 @@ const Page = ({ title = '标题' }) => {
} }
}, },
}, },
data: plandata data: Object.values(plandata)
} }
] ]
} }