mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-25 10:56:34 +08:00
57 lines
1.1 KiB
TypeScript
57 lines
1.1 KiB
TypeScript
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
|
|
import { ScatterBasicConfig } from './index'
|
|
import { CreateComponentType } from '@/packages/index.d'
|
|
import cloneDeep from 'lodash/cloneDeep'
|
|
import dataJson from './data.json'
|
|
|
|
export const includes = ['legend', 'xAxis', 'yAxis']
|
|
|
|
export const option = {
|
|
dataset: dataJson,
|
|
tooltip: {
|
|
showDelay: 0,
|
|
axisPointer: {
|
|
show: true,
|
|
type: 'cross',
|
|
lineStyle: {
|
|
type: 'dashed',
|
|
width: 1
|
|
}
|
|
}
|
|
},
|
|
legend: {},
|
|
|
|
xAxis: {
|
|
show: true,
|
|
type: 'value',
|
|
scale: true,
|
|
splitLine: {
|
|
show: false
|
|
}
|
|
},
|
|
yAxis: {
|
|
show: true,
|
|
type: 'value',
|
|
scale: true,
|
|
splitLine: {
|
|
show: false
|
|
}
|
|
},
|
|
series: [
|
|
{
|
|
type: 'scatter',
|
|
emphasis: {
|
|
focus: 'self'
|
|
},
|
|
symbolSize: 12
|
|
}
|
|
]
|
|
}
|
|
|
|
export default class Config extends PublicConfigClass implements CreateComponentType {
|
|
public key = ScatterBasicConfig.key
|
|
public chartConfig = cloneDeep(ScatterBasicConfig)
|
|
// 图表配置项
|
|
public option = echartOptionProfixHandle(option, includes)
|
|
}
|