chore: add default symbol size, simplify plotIndicators page

This commit is contained in:
Matthias 2024-10-19 09:45:12 +02:00
parent 8a87258076
commit 286db84cc5
2 changed files with 2 additions and 6 deletions

View File

@ -1,10 +1,6 @@
<script setup lang="ts">
import { ChartType, ChartTypeString, IndicatorConfig } from '@/types';
import { watchDebounced } from '@vueuse/core';
const DEFAULT_SCATTER_SYMBOL_SIZE = 3;
const props = defineProps({
modelValue: { required: true, type: Object as () => Record<string, IndicatorConfig> },
columns: { required: true, type: Array as () => string[] },
@ -18,7 +14,7 @@ const availableGraphTypes = ref<ChartTypeString[]>(Object.keys(ChartType) as Cha
const selAvailableIndicator = ref('');
const cancelled = ref(false);
const fillTo = ref('');
const scatterSymbolSize = ref(DEFAULT_SCATTER_SYMBOL_SIZE);
const scatterSymbolSize = ref(3);
function newColor() {
selColor.value = randomColor();

View File

@ -25,7 +25,7 @@ export function generateCandleSeries(
showSymbol: false,
};
if (value.type === ChartType.scatter) {
sp['symbolSize'] = value.scatterSymbolSize;
sp['symbolSize'] = value.scatterSymbolSize ?? 3;
sp['emphasis'] = {
disabled: true,
};