Commit 33e7db89 authored by 何钱贝's avatar 何钱贝

Revert "feat:饼图"

This reverts commit 4ce78662.
parent 4ce78662
<template> <template>
<view> <view>
<uni-ec-canvas
class="uni-ec-canvas"
id="NormalPie"
ref="canvas"
canvas-id="lazy-load-chart"
:ec="ec"
></uni-ec-canvas>
</view> </view>
</template> </template>
<script> <script>
import uniEcCanvas from '@/components/uni-ec-canvas/uni-ec-canvas' export default {
import * as echarts from '@/components/uni-ec-canvas/echarts'
import echartElementData from '@/mixins/echartElementData.js'
let chart = null
export default {
name:"NormalPie", name:"NormalPie",
mixins: [echartElementData],
data() { data() {
return { return {
ec: {
lazyLoad:true
}
};
}
onReady () { };
},
components: {
uniEcCanvas
},
methods: {
initChart() {
this.$nextTick(() => {
this.$refs['canvas'].init((canvas, width, height, canvasDpr) => {
chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: canvasDpr
})
canvas.setChart(chart)
const { dataList: { categories, series } } = this.elementData
const options = {
...this.elementInfo.option,
color: ['#1089E7', '#F57474', '#56D0E3', '#F8B448', '#8B78F6'],
tooltip: {
trigger: 'item',
formatter: '{a}<br/>{b}:{c}({d}%)'
},
series: this.dealSeriesData(series)
}
chart.setOption(options)
return chart
})
})
},
dealSeriesData (data) {
if(!data) return
const series = [{
type: 'pie',
center: ["50%", "50%"],
...props.elementInfo.option.pie,
label: {
...props.elementInfo.option.dataset
},
labelLine: {
show: true
},
data
}]
return series
} }
} }
}
</script> </script>
<style> <style>
......
...@@ -62,11 +62,11 @@ ...@@ -62,11 +62,11 @@
"quickapp" : {}, "quickapp" : {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx072302256a82deb1", "appid" : "wx06342b31eebe8da7",
"setting" : { "setting" : {
"urlCheck" : true, "urlCheck" : true,
"es6" : true, "es6" : true,
"postcss" : false, "postcss" : true,
"minified" : true "minified" : true
}, },
"usingComponents" : true, "usingComponents" : true,
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.21.0", "libVersion": "2.21.0",
"appid": "wx072302256a82deb1", "appid": "wx06342b31eebe8da7",
"projectname": "ec-report-refactor", "projectname": "ec-report-refactor",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
......
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