replace hex codes with color vars
This commit is contained in:
parent
feaf36e92d
commit
2a348b3f8c
|
@ -49,8 +49,8 @@ const TradingViewChart = () => {
|
|||
fullscreen: false,
|
||||
autosize: true,
|
||||
studiesOverrides: {
|
||||
'volume.volume.color.0': theme === 'Mango' ? '#E54033' : '#CC2929',
|
||||
'volume.volume.color.1': theme === 'Mango' ? '#AFD803' : '#5EBF4D',
|
||||
'volume.volume.color.0': COLORS.RED[theme],
|
||||
'volume.volume.color.1': COLORS.GREEN[theme],
|
||||
'volume.precision': 4,
|
||||
},
|
||||
}),
|
||||
|
@ -76,26 +76,20 @@ const TradingViewChart = () => {
|
|||
'haStyle',
|
||||
'barStyle',
|
||||
]
|
||||
|
||||
mainSeriesProperties.forEach((prop) => {
|
||||
chartStyleOverrides = {
|
||||
...chartStyleOverrides,
|
||||
[`mainSeriesProperties.${prop}.barColorsOnPrevClose`]: true,
|
||||
[`mainSeriesProperties.${prop}.drawWick`]: true,
|
||||
[`mainSeriesProperties.${prop}.drawBorder`]: true,
|
||||
[`mainSeriesProperties.${prop}.upColor`]:
|
||||
theme === 'Mango' ? '#AFD803' : '#5EBF4D',
|
||||
[`mainSeriesProperties.${prop}.downColor`]:
|
||||
theme === 'Mango' ? '#E54033' : '#CC2929',
|
||||
[`mainSeriesProperties.${prop}.borderColor`]:
|
||||
theme === 'Mango' ? '#AFD803' : '#5EBF4D',
|
||||
[`mainSeriesProperties.${prop}.borderUpColor`]:
|
||||
theme === 'Mango' ? '#AFD803' : '#5EBF4D',
|
||||
[`mainSeriesProperties.${prop}.borderDownColor`]:
|
||||
theme === 'Mango' ? '#E54033' : '#CC2929',
|
||||
[`mainSeriesProperties.${prop}.wickUpColor`]:
|
||||
theme === 'Mango' ? '#AFD803' : '#5EBF4D',
|
||||
[`mainSeriesProperties.${prop}.wickDownColor`]:
|
||||
theme === 'Mango' ? '#E54033' : '#CC2929',
|
||||
[`mainSeriesProperties.${prop}.upColor`]: COLORS.GREEN[theme],
|
||||
[`mainSeriesProperties.${prop}.downColor`]: COLORS.RED[theme],
|
||||
[`mainSeriesProperties.${prop}.borderColor`]: COLORS.GREEN[theme],
|
||||
[`mainSeriesProperties.${prop}.borderUpColor`]: COLORS.GREEN[theme],
|
||||
[`mainSeriesProperties.${prop}.borderDownColor`]: COLORS.RED[theme],
|
||||
[`mainSeriesProperties.${prop}.wickUpColor`]: COLORS.GREEN[theme],
|
||||
[`mainSeriesProperties.${prop}.wickDownColor`]: COLORS.RED[theme],
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue