mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 08:12:49 +08:00
fix: 修改折线图配置
This commit is contained in:
parent
e69fd0cdc4
commit
159ffb4af2
@ -54,7 +54,7 @@ export const option = {
|
||||
export default class Config extends publicConfig
|
||||
implements CreateComponentType {
|
||||
public key = BarCommonConfig.key
|
||||
public chartConfig = omit(cloneDeep(BarCommonConfig), ['node'])
|
||||
public chartConfig = omit(cloneDeep(BarCommonConfig), ['node', 'conNode'])
|
||||
// 图表配置项
|
||||
public option = echartOptionProfixHandle(option, includes)
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ export const option = {
|
||||
export default class Config extends publicConfig
|
||||
implements CreateComponentType {
|
||||
public key: string = BarCrossrangefig.key
|
||||
public chartConfig = omit(cloneDeep(BarCrossrangefig), ['node'])
|
||||
public chartConfig = omit(cloneDeep(BarCrossrangefig), ['node', 'conNode'])
|
||||
// 图表配置项
|
||||
public option = echartOptionProfixHandle(option, includes)
|
||||
}
|
||||
|
@ -6,6 +6,13 @@ import omit from 'lodash/omit'
|
||||
export const includes = ['legend', 'xAxis', 'yAxis']
|
||||
|
||||
const option = {
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'line'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: true
|
||||
},
|
||||
@ -60,7 +67,7 @@ const option = {
|
||||
export default class Config extends publicConfig
|
||||
implements CreateComponentType {
|
||||
public key: string = LineCommonConfig.key
|
||||
public chartConfig = omit(LineCommonConfig, ['node'])
|
||||
public chartConfig = omit(LineCommonConfig, ['node', 'conNode'])
|
||||
// 图表配置项
|
||||
public option = echartOptionProfixHandle(option, includes)
|
||||
}
|
||||
|
@ -6,54 +6,58 @@ import omit from 'lodash/omit'
|
||||
|
||||
export const includes = ['legend', 'xAxis', 'yAxis']
|
||||
|
||||
const options = echartOptionProfixHandle(
|
||||
{
|
||||
legend: {
|
||||
show: true
|
||||
},
|
||||
xAxis: {
|
||||
show: true,
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
show: true,
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'data1',
|
||||
type: 'line',
|
||||
smooth: false,
|
||||
lineStyle: {
|
||||
normal: {
|
||||
width: 3
|
||||
}
|
||||
},
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: new graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: 'rgba(25,163,223,.5)'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: 'rgba(25,163,223, 0)'
|
||||
}
|
||||
])
|
||||
},
|
||||
data: [120, 200, 150, 80, 70, 110, 130]
|
||||
}
|
||||
]
|
||||
const options = {
|
||||
legend: {
|
||||
show: true
|
||||
},
|
||||
includes
|
||||
)
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'line'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
show: true,
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
},
|
||||
yAxis: {
|
||||
show: true,
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'data1',
|
||||
type: 'line',
|
||||
smooth: false,
|
||||
lineStyle: {
|
||||
normal: {
|
||||
width: 3
|
||||
}
|
||||
},
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: new graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: 'rgba(25,163,223,.5)'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: 'rgba(25,163,223, 0)'
|
||||
}
|
||||
])
|
||||
},
|
||||
data: [120, 200, 150, 80, 70, 110, 130]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default class Config extends publicConfig
|
||||
implements CreateComponentType {
|
||||
public key: string = LineGradientSingleConfig.key
|
||||
public chartConfig = omit(LineGradientSingleConfig, ['node'])
|
||||
public chartConfig = omit(LineGradientSingleConfig, ['node', 'conNode'])
|
||||
// 图表配置项
|
||||
public option = options
|
||||
public option = echartOptionProfixHandle(options, includes)
|
||||
}
|
||||
|
@ -10,6 +10,13 @@ const option = {
|
||||
legend: {
|
||||
show: true
|
||||
},
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'line'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
show: true,
|
||||
type: 'category',
|
||||
@ -78,7 +85,7 @@ const option = {
|
||||
export default class Config extends publicConfig
|
||||
implements CreateComponentType {
|
||||
public key: string = LineGradientsConfig.key
|
||||
public chartConfig = omit(LineGradientsConfig, ['node'])
|
||||
public chartConfig = omit(LineGradientsConfig, ['node', 'conNode'])
|
||||
// 图表配置项
|
||||
public option = echartOptionProfixHandle(option, includes)
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ const option = {
|
||||
export default class Config extends publicConfig implements CreateComponentType {
|
||||
public key: string = PieCommonConfig.key
|
||||
|
||||
public chartConfig = omit(PieCommonConfig, ['node'])
|
||||
public chartConfig = omit(PieCommonConfig, ['node', 'conNode'])
|
||||
|
||||
// 图表配置项
|
||||
public option = echartOptionProfixHandle(option, includes)
|
||||
|
Loading…
Reference in New Issue
Block a user