4. kwargs are for parameters in series or plotOptions (for detail please ref to highcharts API: http://api.highcharts.com/highcharts#) In most examples, add_data_from_jsonp method is used to show a similar practice in Highstock Demos The following example is from Highstock Demos Single line series: http://www.highcharts.com/stock/demo/basic-line """ from highcharts import Highstock from highcharts.highstock.highstock_helper import jsonp_loader H = Highstock() data_url = 'http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json&callback=?' H.add_data_from_jsonp(data_url, 'json_data', 'line', 'AAPL', tooltip = { 'valueDecimals': 2 } ) options = { 'rangeSelector' : { 'selected' : 1 }, 'title' : { 'text' : 'AAPL Stock Price' }, } H.set_dict_options(options) H.htmlcontent
Highstock Demos 1.7 million points with async loading: http://www.highcharts.com/stock/demo/lazy-loading """ """ This example generates a candlestick chart, which updates (async loading) when a different time period is selected by the navigation bar due to the large dataset. Due to the update, this chart requires JS function in the beginning and xAxis.events options. """ from highcharts import Highstock H = Highstock() data_url = 'http://www.highcharts.com/samples/data/from-sql.php?callback=?' H.add_data_from_jsonp(data_url, 'json_data', 'candlestick', dataGrouping = {'enabled': False}) script = """json_data = [].concat(json_data, [[Date.UTC(2011, 9, 14, 19, 59), null, null, null, null]]);""" H.add_JSscript(script, 'head') H.add_navi_series_from_jsonp() # not really useful, but it shows in highstock demo options = { 'chart' : { 'zoomType': 'x' }, 'navigator' : { 'adaptToUpdatedData': False, },
(for detail please ref to highcharts API: http://api.highcharts.com/highcharts#) In most examples, add_data_from_jsonp method is used to show a similar practice in Highstock Demos The following example is from Highstock Demos Single line series: http://www.highcharts.com/stock/demo/basic-line """ from highcharts import Highstock from highcharts.highstock.highstock_helper import jsonp_loader H = Highstock() data_url = 'http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json&callback=?' H.add_data_from_jsonp(data_url, 'json_data', 'line', 'AAPL', tooltip={'valueDecimals': 2}) options = { 'rangeSelector': { 'selected': 1 }, 'title': { 'text': 'AAPL Stock Price' }, } H.set_dict_options(options) H.htmlcontent
Highstock Demos 1.7 million points with async loading: http://www.highcharts.com/stock/demo/lazy-loading """ """ This example generates a candlestick chart, which updates (async loading) when a different time period is selected by the navigation bar due to the large dataset. Due to the update, this chart requires JS function in the beginning and xAxis.events options. """ from highcharts import Highstock H = Highstock() data_url = 'http://www.highcharts.com/samples/data/from-sql.php?callback=?' H.add_data_from_jsonp(data_url, 'json_data', 'candlestick', dataGrouping={'enabled': False}) script = """json_data = [].concat(json_data, [[Date.UTC(2011, 9, 14, 19, 59), null, null, null, null]]);""" H.add_JSscript(script, 'head') H.add_navi_series_from_jsonp( ) # not really useful, but it shows in highstock demo options = { 'chart': { 'zoomType': 'x' }, 'navigator': { 'adaptToUpdatedData': False, },