@@ -244,55 +244,52 @@ Hello World, and Basic Usage
244244
245245 .. code-block :: python
246246
247+ # from a primitive array, using keyword arguments
248+ my_chart = Chart(data = [[1 , 23 ], [2 , 34 ], [3 , 45 ]],
249+ series_type = ' line' )
250+
251+ # from a primitive array, using the .from_array() method
252+ my_chart = Chart.from_array([[1 , 23 ], [2 , 34 ], [3 , 45 ]],
253+ series_type = ' line' )
254+
255+ # from a Numpy ndarray, using keyword arguments
256+ my_chart = Chart(data = numpy_array, series_type = ' line' )
257+
258+ # from a Numpy ndarray, using the .from_array() method
259+ my_chart = Chart.from_array(data = numpy_array, series_type = ' line' )
260+
247261 # from a JavaScript file
248- my_chart = highcharts. Chart.from_js_literal(' my_js_literal.js' )
262+ my_chart = Chart.from_js_literal(' my_js_literal.js' )
249263
250264 # from a JSON file
251- my_chart = highcharts. Chart.from_json(' my_json.json' )
265+ my_chart = Chart.from_json(' my_json.json' )
252266
253267 # from a Python dict
254- my_chart = highcharts.Chart.from_dict(my_dict_obj)
255-
256- # from a GeoPandas GeoDataFrame
257- my_chart = highcharts.Chart.from_geopandas(gdf,
258- property_map = {
259- ' z' : ' caseCount' ,
260- ' id' : ' id' ,
261- },
262- series_type = ' mapbubble' )
268+ my_chart = Chart.from_dict(my_dict_obj)
263269
264270 # from a Pandas dataframe
265- my_chart = highcharts.Chart.from_pandas(df,
266- property_map = {
267- ' x' : ' transactionDate' ,
268- ' y' : ' invoiceAmt' ,
269- ' id' : ' id'
270- },
271- series_type = ' line' )
271+ my_chart = Chart.from_pandas(df)
272272
273273 # from a PySpark dataframe
274- my_chart = highcharts. Chart.from_pyspark(df,
275- property_map = {
276- ' x' : ' transactionDate' ,
277- ' y' : ' invoiceAmt' ,
278- ' id' : ' id'
279- },
280- series_type = ' line' )
274+ my_chart = Chart.from_pyspark(df,
275+ property_map = {
276+ ' x' : ' transactionDate' ,
277+ ' y' : ' invoiceAmt' ,
278+ ' id' : ' id'
279+ },
280+ series_type = ' line' )
281281
282282 # from a CSV
283- my_chart = highcharts.Chart.from_csv(' /some_file_location/filename.csv'
284- column_property_map = {
285- ' x' : 0 ,
286- ' y' : 4 ,
287- ' id' : 14
288- },
289- series_type = ' line' )
283+ my_chart = Chart.from_csv(' /some_file_location/filename.csv' )
290284
291285 # from a HighchartsOptions configuration object
292- my_chart = highcharts. Chart.from_options(my_options)
286+ my_chart = Chart.from_options(my_options)
293287
294- # from a Series configuration
295- my_chart = highcharts.Chart.from_series(my_series)
288+ # from a Series configuration, using keyword arguments
289+ my_chart = Chart(series = my_series)
290+
291+ # from a Series configuration, using .from_series()
292+ my_chart = Chart.from_series(my_series)
296293
297294
298295 3. Configure Global Settings (optional)
@@ -321,9 +318,10 @@ Hello World, and Basic Usage
321318
322319 .. code-block :: python
323320
324- from highcharts_maps .options.title import Title
325- from highcharts_maps .options.credits import Credits
321+ from highcharts_core .options.title import Title
322+ from highcharts_core .options.credits import Credits
326323
324+ # EXAMPLE 1.
327325 # Using dicts
328326 my_chart.title = {
329327 ' align' : ' center'
@@ -334,7 +332,7 @@ Hello World, and Basic Usage
334332
335333 my_chart.credits = {
336334 ' enabled' : True ,
337- ' href' : ' https://www.highcharts .com/' ,
335+ ' href' : ' https://www.highchartspython .com/' ,
338336 ' position' : {
339337 ' align' : ' center' ,
340338 ' vertical_align' : ' bottom' ,
@@ -349,14 +347,19 @@ Hello World, and Basic Usage
349347 ' text' : ' Chris Modzelewski'
350348 }
351349
350+ # EXAMPLE 2.
352351 # Using direct objects
353- from highcharts_maps .options.title import Title
354- from highcharts_maps .options.credits import Credits
352+ from highcharts_core .options.title import Title
353+ from highcharts_core .options.credits import Credits
355354
356- my_title = Title(text = ' The Title for My Chart' , floating = True , align = ' center' )
355+ my_title = Title(text = ' The Title for My Chart' ,
356+ floating = True ,
357+ align = ' center' )
357358 my_chart.options.title = my_title
358359
359- my_credits = Credits(text = ' Chris Modzelewski' , enabled = True , href = ' https://www.highcharts.com' )
360+ my_credits = Credits(text = ' Chris Modzelewski' ,
361+ enabled = True ,
362+ href = ' https://www.highchartspython.com' )
360363 my_chart.options.credits = my_credits
361364
362365
@@ -399,6 +402,13 @@ that will render the chart wherever it is you want it to go:
399402 my_image_bytes = my_chart.download_chart(filename = ' my_target_file.png' ,
400403 format = ' png' )
401404
405+ 8. Render Your Chart in a Jupyter Notebook
406+ ===============================================
407+
408+ .. code-block :: python
409+
410+ my_chart.display()
411+
402412--------------
403413
404414***********************
0 commit comments