perf: 去除grid多余配置,添加散点图、热力图的grid

This commit is contained in:
奔跑的面条 2022-10-15 16:51:16 +08:00
parent 9c9bc98216
commit fa476b6186
10 changed files with 21 additions and 81 deletions

View File

@ -21,6 +21,23 @@
</setting-item-box>
</collapse-item>
<collapse-item v-if="grid" name="容器">
<setting-item-box name="距离">
<setting-item name="左侧距离">
<n-input v-model:value="grid.left" size="small"></n-input>
</setting-item>
<setting-item name="右侧距离">
<n-input v-model:value="grid.right" size="small"></n-input>
</setting-item>
<setting-item name="上侧距离">
<n-input v-model:value="grid.top" size="small"></n-input>
</setting-item>
<setting-item name="下侧距离">
<n-input v-model:value="grid.bottom" size="small"></n-input>
</setting-item>
</setting-item-box>
</collapse-item>
<collapse-item v-if="xAxis" name="X轴">
<template #header>
<n-switch v-model:value="xAxis.show" size="small"></n-switch>
@ -216,23 +233,6 @@
</setting-item-box>
</collapse-item>
<collapse-item v-if="grid" name="网格">
<setting-item-box name="容器距离">
<setting-item name="左侧距离">
<n-input v-model:value="grid.left" size="small"></n-input>
</setting-item>
<setting-item name="右侧距离">
<n-input v-model:value="grid.right" size="small"></n-input>
</setting-item>
<setting-item name="上侧距离">
<n-input v-model:value="grid.top" size="small"></n-input>
</setting-item>
<setting-item name="下侧距离">
<n-input v-model:value="grid.bottom" size="small"></n-input>
</setting-item>
</setting-item-box>
</collapse-item>
<collapse-item v-if="visualMap" name="视觉映射">
<template #header>
<n-switch v-model:value="visualMap.show" size="small"></n-switch>

View File

@ -28,17 +28,7 @@ export const option = {
type: 'shadow'
}
},
legend: {
show: true
},
grid: {
show: false,
left: '10%',
top: '60',
right: '10%',
bottom: '60'
},
xAxis: {
xAxis: {
show: true,
type: 'category'
},

View File

@ -28,16 +28,6 @@ export const option = {
type: 'shadow'
}
},
legend: {
show: true
},
grid: {
show: false,
left: '10%',
top: '60',
right: '10%',
bottom: '60'
},
xAxis: {
show: true,
type: 'value'

View File

@ -33,16 +33,6 @@ export const option = {
type: 'line'
}
},
legend: {
show: true
},
grid: {
show: false,
left: '10%',
top: '60',
right: '10%',
bottom: '60'
},
xAxis: {
show: true,
type: 'category'

View File

@ -15,16 +15,6 @@ const options = {
type: 'line'
}
},
legend: {
show: true
},
grid: {
show: false,
left: '10%',
top: '60',
right: '10%',
bottom: '60'
},
xAxis: {
show: true,
type: 'category'

View File

@ -8,16 +8,6 @@ import dataJson from './data.json'
export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
const option = {
legend: {
show: true
},
grid: {
show: false,
left: '10%',
top: '60',
right: '10%',
bottom: '60'
},
tooltip: {
show: true,
trigger: 'axis',

View File

@ -14,16 +14,6 @@ export const option = {
type: 'line'
}
},
legend: {
show: true
},
grid: {
show: false,
left: '10%',
top: '60',
right: '10%',
bottom: '60'
},
xAxis: {
show: true,
type: 'category'

View File

@ -4,7 +4,7 @@ import { CreateComponentType } from '@/packages/index.d'
import { cloneDeep } from 'lodash'
import dataJson from './data.json'
export const includes = ['xAxis', 'yAxis']
export const includes = ['xAxis', 'yAxis', 'grid']
export const option = {
dataset: { ...dataJson },

View File

@ -4,7 +4,7 @@ import { CreateComponentType } from '@/packages/index.d'
import cloneDeep from 'lodash/cloneDeep'
import dataJson from './data.json'
export const includes = ['legend', 'xAxis', 'yAxis']
export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
export const seriesItem = {
type: 'scatter',

View File

@ -4,7 +4,7 @@ import { CreateComponentType } from '@/packages/index.d'
import cloneDeep from 'lodash/cloneDeep'
import dataJson from './data.json'
export const includes = ['legend', 'xAxis', 'yAxis']
export const includes = ['legend', 'xAxis', 'yAxis', 'grid']
export const option = {
dataset: dataJson,