Python package that convert highchart configuration into image file
Project description
highchartexport
Convert highchart configuration into image file
Installation You can use pip command
pip install highchartexport
Example
In terminal
highchartexport --json "{\"chart\":{\"type\":\"area\"},\"series\":[{\"data\":[1,2,3,4,5,6],\"name\":\"areaplot\"}]}" --out area_chart.png
highchartexport --json "{\"chart\":{\"type\":\"area\"},\"series\":[{\"data\":[1,2,3,4,5,6],\"name\":\"areaplot\"}]}" --out area_chart.png --width 2000 --scale 2
Pass highchart json file
highchartexport --in hc_config.json --out area_chart.svg --width 2000 --scale 2 --type svg
highchartexport --in hc_config.json --out area_chart.svg --chart StockChart --width 2000 --scale 2 --type svg
Import in Python interpretor
import highchartexport as hc_export
config = {
"chart": {
"type": 'bubble',
"plotBorderWidth": 1,
"zoomType": 'xy'
},
"title": {
"text": 'Highcharts bubbles save in pdf file'
},
"series": [{
"data": [
[19, 81, 63],
[98, 5, 89],
[51, 50, 73],
],
"marker": {
"fillColor": {
"radialGradient": { "cx": 0.4, "cy": 0.3, "r": 0.7 },
"stops": [
[0, 'rgba(255,255,255,0.5)'],
[1, 'rgba(200, 200, 200, 0.8)']
]
}
}
}]
}
hc_export.save_as_pdf(config=config, filename="bubble.pdf")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
highchartexport-0.0.3.tar.gz
(17.8 kB
view hashes)
Built Distribution
Close
Hashes for highchartexport-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 586daefd3293ac33638a412776c6401dca19f27e5fdc82ce60fdccf41750e7f3 |
|
MD5 | cf839ed597aa6e6b51938ba77d757bb9 |
|
BLAKE2b-256 | 10e3861823884ab614f476cbfb4fe63f9433b08226526bb67a2eb15c4877c220 |