diff --git a/components/charts/MultiBarChart.vue b/components/charts/MultiBarChart.vue index 6f319bb3c539b..b4ae65019922d 100644 --- a/components/charts/MultiBarChart.vue +++ b/components/charts/MultiBarChart.vue @@ -496,7 +496,9 @@ const options: ThisTypedComponentOptionsWithRecordProps< const labelledbyId = `${this.titleId}-graph` // スクロールする幅が大きい分には問題ないので大きめにした 本来は適切な値を計算すべき - canvas!.parentElement!.parentElement!.parentElement!.scrollLeft! = 2000 + canvas!.parentElement!.parentElement!.parentElement!.scrollLeft! = Number( + process.env.scroll + ) if (canvas) { canvas.setAttribute('role', 'img') diff --git a/components/charts/StackedBarChart.vue b/components/charts/StackedBarChart.vue index 7a5cc5539ad5d..163c87a30cd67 100644 --- a/components/charts/StackedBarChart.vue +++ b/components/charts/StackedBarChart.vue @@ -429,7 +429,7 @@ const options: ThisTypedComponentOptionsWithRecordProps< }, graphWidth() { const window = this.chartWidth ? this.chartWidth : 0 - const calc = this.displayData.labels!.length * 50 + const calc = this.displayData.labels!.length * 70 return Math.max(window, calc) } }, @@ -458,7 +458,9 @@ const options: ThisTypedComponentOptionsWithRecordProps< const canvas = barElement.querySelector('canvas') const labelledbyId = `${this.titleId}-graph` // スクロールする幅が大きい分には問題ないので大きめにした 本来は適切な値を計算すべき - canvas!.parentElement!.parentElement!.parentElement!.scrollLeft! = 2000 + canvas!.parentElement!.parentElement!.parentElement!.scrollLeft! = Number( + process.env.scroll + ) if (canvas) { canvas.setAttribute('role', 'img') diff --git a/components/charts/TimeChart.vue b/components/charts/TimeChart.vue index 047919794a6a4..e0bcca69e4f29 100644 --- a/components/charts/TimeChart.vue +++ b/components/charts/TimeChart.vue @@ -584,7 +584,9 @@ const options: ThisTypedComponentOptionsWithRecordProps< const barElement = barChart.$el const canvas = barElement.querySelector('canvas') // スクロールする幅が大きい分には問題ないので大きめにした 本来は適切な値を計算すべき - canvas!.parentElement!.parentElement!.parentElement!.scrollLeft! = 2000 + canvas!.parentElement!.parentElement!.parentElement!.scrollLeft! = Number( + process.env.scroll + ) } } diff --git a/nuxt.config.ts b/nuxt.config.ts index ddfbd8e0aa25a..2eed86cb96447 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -9,7 +9,8 @@ const config: Configuration = { env: { apiUrl: 'https://data-covid19-oita.netlify.app/data.json', supportUrl: 'https://data-covid19-oita.netlify.app/financial.json', - newsUrl: 'https://data-covid19-oita.netlify.app/news.json' + newsUrl: 'https://data-covid19-oita.netlify.app/news.json', + scroll: '100000' }, /* ** Headers of the page