Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
undefined許容の?を削除
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizumaki committed Jul 12, 2022
1 parent 2a6972a commit 8fde20d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/vue-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,23 @@ const createCustomChart = () => {
},
min(value: string) {
// @ts-ignore
this.$data._chart.options.scales.xAxes?.forEach((v: any) => {
this.$data._chart.options.scales.xAxes.forEach((v: any) => {
v.ticks.min = value
})
// @ts-ignore
this.$data._chart.update()
},
max(value: string) {
// @ts-ignore
this.$data._chart.options.scales.xAxes?.forEach((v: any) => {
this.$data._chart.options.scales.xAxes.forEach((v: any) => {
v.ticks.max = value
})
// @ts-ignore
this.$data._chart.update()
},
yAxisMax(value: number) {
// @ts-ignore
this.$data._chart.options.scales.yAxes?.forEach((v: any) => {
this.$data._chart.options.scales.yAxes.forEach((v: any) => {
v.ticks.max = value
})
// @ts-ignore
Expand All @@ -118,11 +118,11 @@ const createCustomChart = () => {
switch(newValue: string, oldValue: string) {
if (newValue !== oldValue) {
// @ts-ignore
this.$data._chart.options.scales.xAxes?.forEach((v: any) => {
this.$data._chart.options.scales.xAxes.forEach((v: any) => {
v.ticks.min = this.min
})
// @ts-ignore
this.$data._chart.options.scales.xAxes?.forEach((v: any) => {
this.$data._chart.options.scales.xAxes.forEach((v: any) => {
v.ticks.max = this.max
})
// @ts-ignore
Expand Down

0 comments on commit 8fde20d

Please sign in to comment.