Skip to content

Commit

Permalink
Disable color update issue in LineChart.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Apr 26, 2024
1 parent c379104 commit 76d9fde
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/src/components/LineChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<v-col>
<v-btn @click="downloadChart()">
<v-icon :icon="mdiDownloadBox"></v-icon>Download</v-btn>
<v-btn class="ma-2" :icon="mdiPalette" @click="updateChartColor()" size="small">
</v-btn>
<!-- <v-btn class="ma-2" :icon="mdiPalette" @click="updateChartColor()" size="small">
</v-btn> -->
</v-col>
</v-row>
</v-container>
Expand All @@ -34,7 +34,7 @@ import { enUS } from 'date-fns/locale';
import { useChartsStore } from '@/stores/charts'
import { ref, onMounted } from 'vue'
import { customCanvasBackgroundColor } from '@/_helpers/charts/plugins'
import { mdiPalette, mdiDownloadBox } from '@mdi/js'
// import { mdiPalette, mdiDownloadBox } from '@mdi/js'
const chartStore = useChartsStore()
const props = defineProps({ data: Object, chosenVariable: Object })
Expand Down Expand Up @@ -120,6 +120,7 @@ const updateChartColor = (color) => {
dataset.borderColor = color
dataset.backgroundColor = color
})
// TODO: for some reasone the chart gets clobbered when updating the color
line.value.chart.update()
}
Expand Down

0 comments on commit 76d9fde

Please sign in to comment.