import { Component } from '../../../node_modules/@angular/core' ; import { Jsonp } from '../../../node_modules/@angular/http' ; @ Component ( { selector : 'stock-chart-example' , template : `<chart type="StockChart" [options]="options"></chart>` } ) export class StockChartExample { constructor ( jsonp ) { jsonp . request ( 'https://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json&callback=JSONP_CALLBACK' ) . subscribe ( res => { this . options = { title : { text : 'AAPL Stock Price' } , series : [ { name : 'AAPL' , data : res . json ( ) , tooltip : { valueDecimals : 2 } } ] } ; } ) ; } options : Object ; }