Skip to main content
100%

NVD3 Bubble Chart

✓ Published0🌍 Public
PPatMartin
Last edited Aug 7, 2017
Created on Jan 29, 2017

This example demonstrates an NVD3 bubble chart rendered through the dex.js library, plotting simulated data for ten named individuals across two years. Each data point’s Y-value and bubble size are generated randomly using the Faker API. The chart relies on NVD3 1.8.5, which runs on D3 v3, and the code explicitly switches the global `d3` object to `dex.charts.d3.d3v3` before loading NVD3 to ensure compatibility. The visualization is placed inside a full-page parent div, and the chart is configured and rendered via `dex.charts.nvd3.BubbleChart`.

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

mit Licensed

Similar vizzes