angular-google-charts icon indicating copy to clipboard operation
angular-google-charts copied to clipboard

Use Types interfaces in project

Open avocadosarelife opened this issue 2 years ago • 0 comments

Hello,

Is it possible to access to the interfaces in the index.d.ts file? As of now I am defining my own ChartOptions but would love to use BarChartOptions for example directly.

Then, taking the example from the documentation, I could type the options and profit from Intellisense : )

// original example
myOptions = {
  colors: ['#e0440e', '#e6693e', '#ec8f6e', '#f3b49f', '#f6c7b6'],
  is3D: true
};

// typed example
myOptions: BarChartOptions = {
  colors: ['#e0440e', '#e6693e', '#ec8f6e', '#f3b49f', '#f6c7b6'],
  is3D: true
};

avocadosarelife avatar Sep 28 '22 13:09 avocadosarelife