Skip to content

Commit

Permalink
Correct AmPieChart typings (#9193)
Browse files Browse the repository at this point in the history
* Correct AmPieChart typings

AmPieChart should inherit from AmChart (as mentioned in the AmChart website: https://docs.amcharts.com/javascriptcharts/AmPieChart)

* Removed the duplicate addListener

AmChart class should already have description for 'addListener'
  • Loading branch information
huyph authored and vvakame committed May 5, 2016
1 parent e1860b0 commit 6b44986
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions amcharts/AmCharts.d.ts
Expand Up @@ -36,7 +36,7 @@ declare namespace AmCharts {
chart.dataProvider = chartData;
chart.write("chartdiv");
*/
class AmPieChart {
class AmPieChart extends AmChart {
/** Name of the field in chart's dataProvider which holds slice's alpha. */
alphaField: string;
/** Pie lean angle (for 3D effect). Valid range is 0 - 90. */
Expand Down Expand Up @@ -187,19 +187,6 @@ declare namespace AmCharts {
rollOverSlice(index: number);
/** Shows slice. index - the number of a slice or Slice object. */
showSlice(index: number);

/** Adds event listener of the type "clickSlice" or "pullInSlice" or "pullOutSlice" to the object.
@param type Always "clickSlice" or "pullInSlice" or "pullOutSlice".
@param handler
If the type is "clickSlice", dispatched when user clicks on a slice.
If the type is "pullInSlice", dispatched when user clicks on a slice and the slice is pulled-in.
If the type is "pullOutSlice", dispatched when user clicks on a slice and the slice is pulled-out.
If the type is "rollOutSlice", dispatched when user rolls-out of the slice.
If the type is "rollOverSlice", dispatched when user rolls-over the slice.
*/
addListener(type: string, handler: (e: {/** Always "rollOverSlice". */
type: string; dataItem: Slice;
}) => void );
}

/** AmRadarChart is the class you have to use for radar and polar chart types.
Expand Down

0 comments on commit 6b44986

Please sign in to comment.