mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-22 19:15:15 +00:00
Add support for light Theme
This commit is contained in:
parent
635d70fe56
commit
6239d30fbc
|
@ -133,7 +133,7 @@ const diffCols = computed(() => {
|
|||
return getDiffColumnsFromPlotConfig(props.plotConfig);
|
||||
});
|
||||
|
||||
usePercentageTool(candleChart);
|
||||
usePercentageTool(candleChart, props.theme);
|
||||
|
||||
function updateChart(initial = false) {
|
||||
if (!hasData.value) {
|
||||
|
|
|
@ -5,9 +5,11 @@ import { GraphicComponent } from 'echarts/components';
|
|||
|
||||
use([GraphicComponent]);
|
||||
|
||||
export function usePercentageTool(chartRef: Ref) {
|
||||
export function usePercentageTool(chartRef, theme: string) {
|
||||
const inputListener = useInputListener();
|
||||
|
||||
const color = theme === 'dark' ? 'white' : 'black';
|
||||
|
||||
const mousePos = ref({ x: 0, y: 0 });
|
||||
const startPos = ref({ x: 0, y: 0 });
|
||||
const drawLimitPerSecond = 144;
|
||||
|
@ -37,7 +39,7 @@ export function usePercentageTool(chartRef: Ref) {
|
|||
y2: mousePos.value.y,
|
||||
},
|
||||
style: {
|
||||
stroke: 'white',
|
||||
stroke: color,
|
||||
},
|
||||
},
|
||||
{ type: 'text', z: 5 },
|
||||
|
@ -74,7 +76,7 @@ export function usePercentageTool(chartRef: Ref) {
|
|||
y: y - 20,
|
||||
text: (startPrice < endPrice ? pct : '-' + pct) + '%',
|
||||
font: '16px sans-serif',
|
||||
fill: 'white',
|
||||
fill: color,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue
Block a user