/* * @Author: changjun * @FilePath: /qingdao-safety-product/src/components/chart/YaLineChart/options.ts * @Date: 2022-07-28 10:55:50 * @Description: 折线图的配置,通过 theme 参数配置折线图的样式 * @LastEditTime: 2022-07-28 11:17:28 * @LastEditors: changjun */ import { fixLineTooltipPosition } from './logic' export const optionsOne = { grid: { top: '20%', left: '4%', right: '4%', bottom: '20%' }, tooltip: { trigger: 'axis', position: fixLineTooltipPosition, axisPointer: { lineStyle: { color: 'rgba(198, 209, 219, .6)' } }, show: true, backgroundColor: 'rgba(49,120,160,0.7500)', extraCssText: 'z-index: 9;box-shadow: 3px 4px 9px 0px rgba(69,171,214,0.3500);', appendToBody: false, borderColor: '#48B3E0', textStyle: { fontSize: '12', color: '#fff' } }, } export const optionsTow = {} const THEME_OPTIONS = { 1: optionsOne, 2: optionsTow } export const getDefaultOptions = (theme: number) => { return THEME_OPTIONS[`${theme}`] }