Skip to main content
100%

NVD3 Bubble Chart

✓ Published0🌍 Public
AAjayyy
Last edited Jun 15, 2018
Created on Jun 15, 2018

This example uses the NVD3 library to render a bubble chart from synthetic data generated with Faker.js. The chart displays ten named series across two years of monthly data, with random Y values and bubble sizes. The code loads D3 v3 via dex.js’s compatibility layer, then delegates to `nv.d3.min.js` to produce the interactive NVD3 visualization. The data is structured as CSV and passed directly to the `dex.charts.nvd3.BubbleChart` component, which handles rendering within the specified parent div.

AI-generated description

NVD3 Bubble Chart

This is the dex.js bubble chart leveraging NVD3. I really love how much polish the NVD3 folks have put into this chart.

Comments

NVD3 only works with D3 v3, so we switch over to D3v3 as we load scripts via:

<script src="https://cdn.rawgit.com/PatMartin/dexjs/master/dist/dex.min.js"></script>
<script>d3 = dex.charts.d3.d3v3;</script>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.5/nv.d3.min.js"></script>

And everything works fine. We can even support chart interactions between visuals written in different versions of D3 as well as altogether different non-D3 web technologies.

References

forked from <a href='http://bl.ocks.org/PatMartin/'>PatMartin</a>'s block: <a href='http://bl.ocks.org/PatMartin/8184531920febc87269322f46e172322'>NVD3BubbleChart</a>

mit Licensed

Similar vizzes