27 lines
572 B
TypeScript
Raw Normal View History

import merge from 'lodash/merge'
import pick from 'lodash/pick'
2022-02-02 18:17:45 +08:00
/**
* * ECharts option
* @param option
*/
export const echartOptionProfixHandle = (option: any) => {
option['backgroundColor'] = 'rgba(0,0,0,0)'
return option
}
/**
* * color
* @param option
* @param themeSetting
* @param excludes
* @returns object
*/
export const mergeTheme = <T, U, E extends keyof U> (
option: T,
themeSetting: U,
includes: E[] = []
) => {
return merge(pick(themeSetting, includes), option)
}