Rendering#
Rendering is the process by which a chart configuration is serialized and displayed as a Highcharts instance in your Jupyter notebook in your browser.
Modules and extensions#
Some chart types (e.g. Sankey) or features (e.g. exporting) require additional javascript modules to render in your Jupyter notebook.
Note
- By default, the following modules are loaded
https://code.highcharts.com/highcharts.js (required)
The full list of available modules is available from the Highcharts CDN page.
Hint
Check the Highcharts API documentation to see which chart types have dependencies. For example, the venn chart type requires the venn module.
To load an additional module in your Jupyter notebook, add the required modules script path to the config. Here are a few examples:
import easychart
# Sankey module
# https://api.highcharts.com/highcharts/series.sankey
easychart.config.scripts.append("https://code.highcharts.com/modules/sankey.js")
# save changes if you want these imports to persist in your next session
easychart.config.save()
Attention
Do not mix versioned modules (e.g. https://code.highcharts.com/8/highcharts.js) with unversioned modules (https://code.highcharts.com/modules/heatmap.js) as this may result in conflicts.
To see which modules are already imported in your config, simply print the configuration to your console:
import easychart
print(easychart.config)
Once customized and saved the config file is saved at the following location
import os
os.path.expanduser("~/.easychart/config.json")
You can reset the config file back to factory values by calling the reset method:
import easychart
easychart.config.reset()
easychart.config.save()