|
15 | 15 | - [Chart Events](#chart-events) |
16 | 16 | - [Series Events](#series-events) |
17 | 17 | - [Point Events](#point-events) |
| 18 | + - [X-Axis Events](#x-axis-events) |
| 19 | + - [Y-Axis Events](#y-axis-events) |
18 | 20 | - [Dynamic Interaction with Chart Object](#dynamic-interaction-with-chart-object) |
19 | 21 | - [Access to the Highcharts Static Members](#access-to-the-highcharts-static-members) |
20 | 22 | - [Highstock and Highmaps](#highstock-and-highmaps) |
@@ -101,14 +103,38 @@ Similary you can use the `point` to access to [options.plotOptions.series.point. |
101 | 103 | </series> |
102 | 104 | </chart> |
103 | 105 | <p><b>{{point}}</b> is selected<p> |
| 106 | +``` |
| 107 | +[Live Demo](http://plnkr.co/edit/TpKoJ60n4vyIDWxHNUkg?p=preview) |
| 108 | +#### X-Axis Events |
104 | 109 |
|
| 110 | +Similary you can use the `xAxis` to access to [options.xAxis.events](http://api.highcharts.com/highcharts#xAxis.events) API. |
| 111 | +```HTML |
| 112 | +<chart [options]="options"> |
| 113 | + <xAxis (afterSetExtremes)="onAfterSetExtremes($event)"></xAxis> |
| 114 | +</chart> |
105 | 115 | ``` |
106 | 116 | ```TypeScript |
107 | | -onPointSelect (e) { |
108 | | - this.serieName = e.context.y; |
| 117 | +onAfterSetExtremes (e) { |
| 118 | + this.min = e.context.min; |
| 119 | + this.max = e.context.max; |
109 | 120 | } |
110 | 121 | ``` |
111 | | -[Live Demo](http://plnkr.co/edit/TpKoJ60n4vyIDWxHNUkg?p=preview) |
| 122 | +[Live Demo](http://plnkr.co/edit/2tVDzLDDVaGwUQZe6vDj?p=preview) |
| 123 | +#### Y-Axis Events |
| 124 | + |
| 125 | +Similary you can use the `yAxis` to access to [options.yAxis.events](http://api.highcharts.com/highcharts#yAxis.events) API. |
| 126 | +```HTML |
| 127 | +<chart [options]="options"> |
| 128 | + <yAxis (afterSetExtremes)="onAfterSetExtremes($event)"></yAxis> |
| 129 | +</chart> |
| 130 | +``` |
| 131 | +```TypeScript |
| 132 | +onAfterSetExtremes (e) { |
| 133 | + this.min = e.context.min; |
| 134 | + this.max = e.context.max; |
| 135 | +} |
| 136 | +``` |
| 137 | +[Live Demo](http://plnkr.co/edit/HHUa9fHL766ynsi7Y5hR?p=preview) |
112 | 138 | ### Dynamic Interaction with Chart Object |
113 | 139 |
|
114 | 140 | angular2-higcharts provides possibility to interact with native `HighchartsChartObject` chart object. |
|
0 commit comments