Date Tags D3js / mpl3d

After my initial testing of D3js, I came accross mpld3 and I wanted to quickly know if it was possible to integrate those nice plot with pelican_dynamic.

I took the code from the Scatter Plot With Tooltips example, and instead of showing the result with mpld3.show(), I saved it using

mpld3.save_json(fig, 'ScatterPlotWithTooltips.json')

Thus I just need to create a simple js file with

$.getJSON("ScatterPlotWithTooltips.json", function(json){
mpld3.draw_figure("fig_scatter", json);
});

And by defining the proper

in the mardown document-relative

<div class="d3-chart" id="fig_scatter"><div>

Here is the result :

Isn't that a nice looking chart up there?