From 30176f760d3fd2e598cfdcd4f0d5e0aee38165f7 Mon Sep 17 00:00:00 2001 From: ChrisPaulBennett Date: Tue, 24 Sep 2024 11:40:19 +0100 Subject: [PATCH 1/2] Explicitly defining toolbar items. Changes download tooltip --- src/components/cylc/gantt/GanttChart.vue | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/components/cylc/gantt/GanttChart.vue b/src/components/cylc/gantt/GanttChart.vue index 1dbac92a5..33cbb37dd 100644 --- a/src/components/cylc/gantt/GanttChart.vue +++ b/src/components/cylc/gantt/GanttChart.vue @@ -162,6 +162,25 @@ export default { const { start, end } = timingOptions.get(this.timingOption) return { chart: { + defaultLocale: 'en', + locales: [ + { + name: 'en', + options: { + toolbar: { + exportToSVG: 'Download SVG', + exportToPNG: 'Download PNG', + menu: 'Download', + selection: 'Selection', + selectionZoom: 'Selection Zoom', + zoomIn: 'Zoom In', + zoomOut: 'Zoom Out', + pan: 'Panning', + reset: 'Reset Zoom' + } + } + } + ], animations: { enabled: this.animate && !this.reducedAnimation, easing: 'easeinout', @@ -179,6 +198,12 @@ export default { toolbar: { tools: { download: ``, + selection: true, + zoom: true, + zoomin: true, + zoomout: true, + pan: true, + reset: true }, }, }, From ac8a8de20192a99fd112110f3fad574691d59c55 Mon Sep 17 00:00:00 2001 From: ChrisPaulBennett Date: Tue, 1 Oct 2024 13:22:37 +0100 Subject: [PATCH 2/2] Fixed download button in box plot and time series --- src/components/cylc/analysis/BoxPlot.vue | 13 +++++++++++++ src/components/cylc/analysis/TimeSeries.vue | 21 ++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/components/cylc/analysis/BoxPlot.vue b/src/components/cylc/analysis/BoxPlot.vue index 9887ededc..a8f90e407 100644 --- a/src/components/cylc/analysis/BoxPlot.vue +++ b/src/components/cylc/analysis/BoxPlot.vue @@ -130,6 +130,19 @@ export default { const chartOptions = computed(() => ({ chart: { + defaultLocale: 'en', + locales: [ + { + name: 'en', + options: { + toolbar: { + exportToSVG: 'Download SVG', + exportToPNG: 'Download PNG', + menu: 'Download' + } + } + } + ], animations: { enabled: reducedAnimation.value ? false : props.animate, easing: 'easeinout', diff --git a/src/components/cylc/analysis/TimeSeries.vue b/src/components/cylc/analysis/TimeSeries.vue index 6df5ee8ef..40f8bb84a 100644 --- a/src/components/cylc/analysis/TimeSeries.vue +++ b/src/components/cylc/analysis/TimeSeries.vue @@ -305,6 +305,25 @@ export default { chartOptions () { return { chart: { + defaultLocale: 'en', + locales: [ + { + name: 'en', + options: { + toolbar: { + exportToSVG: 'Download SVG', + exportToPNG: 'Download PNG', + menu: 'Download', + selection: 'Selection', + selectionZoom: 'Selection Zoom', + zoomIn: 'Zoom In', + zoomOut: 'Zoom Out', + pan: 'Panning', + reset: 'Reset Zoom' + } + } + } + ], animations: { enabled: this.animate && !this.reducedAnimation, easing: 'easeinout', @@ -401,7 +420,7 @@ export default { }, toolbar: { autoSelected: 'selection', - show: false + show: true } }, legend: {