Skip to content

Commit

Permalink
use chart.js types
Browse files Browse the repository at this point in the history
  • Loading branch information
bobheadxi committed Jul 18, 2019
1 parent 722b1db commit 024adf1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"@babel/core": "^7.0.0-beta.42",
"@babel/preset-env": "^7.0.0-beta.42",
"@babel/preset-stage-2": "^7.0.0-beta.42",
"@types/chart.js": "^2.7.55",
"babel-loader": "8.0.0-beta.0",
"chai": "^3.5.0",
"chart.js": "^2.8.0",
Expand Down
3 changes: 2 additions & 1 deletion types/components.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Vue from 'vue'
import { ChartData, ChartOptions } from 'chart.js';

/** vue-chartjs component common definition */
export declare class BaseChart extends Vue {
addPlugin (plugin?: string[]): void
renderChart (chartData: any, options?: any): void
renderChart (chartData: ChartData, options?: ChartOptions): void
}
7 changes: 4 additions & 3 deletions types/mixins.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import Vue from 'vue'
import Vue from 'vue';
import { ChartData } from 'chart.js';

export declare class ReactiveDataMixin extends Vue {
chartData: any;
chartData: ChartData;
}

export declare class ReactivePropMixin extends Vue {
readonly chartData: any;
readonly chartData: ChartData;
}

0 comments on commit 024adf1

Please sign in to comment.