feat: 新增全局样式设置

This commit is contained in:
MTrun
2022-02-21 19:45:11 +08:00
parent 133c6bea6b
commit 8b890fb5e3
11 changed files with 162 additions and 61 deletions
@@ -0,0 +1,53 @@
{
"title": {
"textStyle": {
"color": "#464646"
},
"subtextStyle": {
"color": "#6e7079"
}
},
"xAxis": {
"nameTextStyle": {
"color": "#B9B8CE"
},
"axisLine": {
"lineStyle": {
"color": "#B9B8CE",
"width": 1
},
"onZero": true,
"onZeroAxisIndex": null
},
"splitLine": {
"lineStyle": {
"color": "#484753",
"width": 1
}
}
},
"yAxis": {
"nameTextStyle": {
"color": "#B9B8CE"
},
"axisLine": {
"lineStyle": {
"color": "#B9B8CE",
"width": 1
},
"onZero": true,
"onZeroAxisIndex": null
},
"splitLine": {
"lineStyle": {
"color": "#484753",
"width": 1
}
}
},
"legend": {
"textStyle": {
"color": "#B9B8CE"
}
}
}
+10
View File
@@ -10,6 +10,8 @@ import vintage from './themes/vintage.json'
import walden from './themes/walden.json'
import westeros from './themes/westeros.json'
import wonderland from './themes/wonderland.json'
// 默认主题详细配置
import themeJson from './global.theme.json'
export const chartColors = {
dark,
@@ -26,8 +28,11 @@ export const chartColors = {
roma,
}
// 默认主题
export const defaultTheme = 'dark'
// 主题色列表
export type ChartColorsNameType = keyof typeof chartColorsName
export const chartColorsName = {
dark: '明亮',
customed: '暗淡',
@@ -43,6 +48,7 @@ export const chartColorsName = {
roma: '罗马红',
}
// 主题色列表
export const chartColorsshow = {
dark: 'linear-gradient(to right, #4992ff 0%, #7cffb2 100%)',
customed: 'linear-gradient(to right, #5470c6 0%, #91cc75 100%)',
@@ -57,3 +63,7 @@ export const chartColorsshow = {
shine: 'linear-gradient(to right, #c12e34 0%, #0098d9 100%)',
roma: 'linear-gradient(to right, #e01f54 0%, #5e4ea5 100%)',
}
// 默认主题详细配置
export type GlobalThemeJsonType = typeof themeJson
export const globalThemeJson = themeJson