| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 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: {
- // trigger: 'axis',
- 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)
- }
|