diff --git a/src/components/charts/PlotConfigurator.vue b/src/components/charts/PlotConfigurator.vue index 2b2f3e34..fa5ec73d 100644 --- a/src/components/charts/PlotConfigurator.vue +++ b/src/components/charts/PlotConfigurator.vue @@ -51,7 +51,10 @@ size="sm" class="ms-1 col" :disabled="addNewIndicator" - @click="addNewIndicator = !addNewIndicator" + @click=" + addNewIndicator = !addNewIndicator; + selIndicatorName = ''; + " > Add new indicator @@ -158,6 +161,7 @@ import { deepClone } from '@/shared/deepClone'; import { useBotStore } from '@/stores/ftbotwrapper'; import { usePlotConfigStore } from '@/stores/plotConfig'; import { computed, onMounted, onUnmounted, ref, watch } from 'vue'; +import randomColor from '@/shared/randomColor'; defineProps({ columns: { required: true, type: Array as () => string[] }, @@ -322,7 +326,11 @@ function addNewIndicatorSelected(indicator?: string) { addNewIndicator.value = false; if (indicator) { - addIndicator({ [indicator]: {} }); + addIndicator({ + [indicator]: { + color: randomColor(), + }, + }); selIndicatorName.value = indicator; } } diff --git a/src/components/charts/PlotIndicatorSelect.vue b/src/components/charts/PlotIndicatorSelect.vue index f9668258..008024ca 100644 --- a/src/components/charts/PlotIndicatorSelect.vue +++ b/src/components/charts/PlotIndicatorSelect.vue @@ -13,7 +13,7 @@