mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-12 00:00:01 +08:00
fix: 修改线条的 dataset 问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
|
||||
import { PieCommonConfig } from './index'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import dataJson from './data.json'
|
||||
|
||||
export const includes = ['legend']
|
||||
|
||||
@@ -12,9 +13,9 @@ const option = {
|
||||
legend: {
|
||||
show: true,
|
||||
},
|
||||
dataset: { ...dataJson },
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['40%', '65%'],
|
||||
center: ['50%', '60%'],
|
||||
@@ -38,14 +39,7 @@ const option = {
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: 'Search Engine' },
|
||||
{ value: 735, name: 'Direct' },
|
||||
{ value: 580, name: 'Email' },
|
||||
{ value: 484, name: 'Union Ads' },
|
||||
{ value: 300, name: 'Video Ads' }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"dimensions": ["product", "data1"],
|
||||
"source": [
|
||||
{
|
||||
"product": "Mon",
|
||||
"data1": 120
|
||||
},
|
||||
{
|
||||
"product": "Tue",
|
||||
"data1": 200
|
||||
},
|
||||
{
|
||||
"product": "Wed",
|
||||
"data1": 150
|
||||
},
|
||||
{
|
||||
"product": "Thu",
|
||||
"data1": 80
|
||||
},
|
||||
{
|
||||
"product": "Fri",
|
||||
"data1": 70
|
||||
},
|
||||
{
|
||||
"product": "Sat",
|
||||
"data1": 110
|
||||
},
|
||||
{
|
||||
"product": "Sun",
|
||||
"data1": 130
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,12 +5,13 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, PropType } from 'vue'
|
||||
import VChart from 'vue-echarts'
|
||||
import { use, graphic } from 'echarts/core'
|
||||
import { use } from 'echarts/core'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import { PieChart } from 'echarts/charts'
|
||||
import { mergeTheme } from '@/packages/public/chart'
|
||||
import config, { includes } from './config'
|
||||
import {
|
||||
DatasetComponent,
|
||||
GridComponent,
|
||||
TooltipComponent,
|
||||
LegendComponent,
|
||||
@@ -32,6 +33,7 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
use([
|
||||
DatasetComponent,
|
||||
CanvasRenderer,
|
||||
PieChart,
|
||||
GridComponent,
|
||||
|
||||
Reference in New Issue
Block a user