123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- <template>
- <view class="container" v-if="indicator.length>0">
- <echarts class="container100" ref="echarts" :option="option" canvasId="echartsT"></echarts>
- </view>
- </template>
- <script>
- import echarts from "@/components/echarts-uniapp/echarts-uniapp.vue"
- export default {
- name: "leiDa",
- props: ["indicator", "reference", "scoreList"],
- components: {
- echarts
- },
- data() {
- return {
- option: {},
-
- }
- },
- watch: {
- indicator: {
- immediate: true,
- handler(newValue, oldValue) {
- this.drawLine();
- }
- }
- },
- mounted() {},
- methods: {
- drawLine() {
- let _this = this;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var option = {
- title: {
- text: 'Basic Radar Chart'
- },
- legend: {
- data: ['Allocated Budget', 'Actual Spending']
- },
- radar: {
-
- indicator: [{
- name: 'Sales',
- max: 6500
- },
- {
- name: 'Administration',
- max: 16000
- },
- {
- name: 'Information Technology',
- max: 30000
- },
- {
- name: 'Customer Support',
- max: 38000
- },
- {
- name: 'Development',
- max: 52000
- },
- {
- name: 'Marketing',
- max: 25000
- }
- ]
- },
- series: [{
- name: 'Budget vs spending',
- type: 'radar',
- data: [{
- value: [4200, 3000, 20000, 35000, 50000, 18000],
- name: 'Allocated Budget'
- },
- {
- value: [5000, 14000, 28000, 26000, 42000, 21000],
- name: 'Actual Spending'
- }
- ]
- }]
- };
- }
- }
- }
- </script>
- <style>
- .container {
-
- height: 320px;
- }
- .container100 {
- width: 100%;
- height: 100%;
- }
- </style>
|