Skip to main content

Posts

Showing posts with the label Altair

How to create a JS file from python graph

I have used altair to create graphs using python. So I have used following code to save the chart. chart.save('chart.html', embed_options={'actions': False}) My chart.html file look as below, <!DOCTYPE html> <html> <head> <style> .error { color: red; } </style> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm//vega@5"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm//vega-lite@4.8.1"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm//vega-embed@6"></script> </head> <body> <div id="vis"></div> <script> (function(vegaEmbed) { var spec = {"config": {"view": {"continuousWidth": 400, "continuousHeight": 300}}, "data": {"url": "https://c...