, ,

A Beginner’s Guide to Interactive Data Visualisation with AI & D3.js

rquickenden avatar

D3 stands for Data-Driven Documents. It is a free, open-source JavaScript library for creating custom, interactive data visualisations. Rather than simply displaying a chart as an image, it lets developers connect data to visual elements and control how those elements appear, respond and change.

Think charts that reshape as you filter. Technology landscapes you can explore. Relationships that become clearer as you select different parts of the information.

This weekend, some of my fellow MVPs have been posting about how SharePoint can now render HTML pages which are built with D3 scripts. As such this prompted me to explore this a little more and share my findings with you all!

How’s that different from HTML?

This isn’t really about HTML versus D3. D3 works within web experiences built using HTML, JavaScript and other web standards.

The difference is about thinking about what it is you are building and how you want that presented.

An interactive slide deck or webpage (you can use Copilot (or your “other AI Tools) to create these in PowerPoint, Excel or just as standalone HTML. They are great for taking rows of data or tons of slide and simplifying or filtering the data so it’s easier to digest. Ideally, these interactive slides or dashboards should follow a story the author has designed or that the data tells. You might reveal content, switch tabs or move between sections.

A data explorer gives the reader more control over the journey. They user could choose an area, narrow the information and investigate what matters to them.

Both approaches can include charts, animation and interaction. D3 is particularly useful when you want bespoke, data-driven visuals rather than just navigation and animated content. It provides tools for layouts, zooming, selection and smooth transitions between visual states.

My experience is that if you want to Copilot to work a little harder when creating such interactive content, asking it to use D3 really helps…

Turn a “Book of News” into Interactive Guide

As an example of what this can do, and with Microsoft Ignite last week, I decided to turn Microsoft’s “book of news” into an interactive standalone HTML that uses D3.js to make this interactive and visual.

The Book of News has plenty of really useful information, but not everyone wants the same view. Someone interested in security will approach it differently from someone focused on Security, Copilot, Azure or AI development.

D3 is particularly suited to this because it is designed for bespoke, dynamic data visualisation. Its core building blocks include data-driven DOM selections, scales and axes, shapes, transitions, interactive behaviours, hierarchical layouts and geographic visualisations.

So, rather than asking Copilot for another summary, I asked it to create an interactive HTML explorer.

Using no CREDITS (just Copilot Chat) we (me and Copilot) managed to transform the book of news into 66 curated announcement categories and summaries, organised by technology area and theme, with search, filters, a saved shortlist and some D3.js visualisations.

These included a sunburst showing the relationship between areas, themes and announcements, alongside a release-stage comparison.

You can experience the interactive book of news here

Here’s the interactive webpage I built below… There’s a link below to the actual file which you can copy as needed.

Interactive Book of News Video in HTML

Try for yourself

To get started, copy and paste or adapt this prompt. Use this in your favourite AI tool. I have tried this in Copilot (consumer) version, ChatGPT, M365 Copilot etc.

Turn [ATTACHED DOCUMENT, WEB LINK OR DATASET] into a modern, interactive HTML explorer using D3.js.

Group the information by [TECHNOLOGY AREA / TOPIC / THEME], with searchable summaries, filters and click-to-open details. Use only source-supported information.

Make the data come to life: on opening, show one coloured dot per item, then animate every dot dropping into its correct labelled category. When a category is selected, scramble the dots upwards, filter them and settle the matching items into a group showing the accurate result count.

Use [MY BRAND KIT / COLOURS], support light and dark modes, and include replay, skip and reduced-motion options. Keep navigation clear and don’t automatically scroll when filtering.

Create a downloadable HTML file that opens in a browser. Explain any external dependencies. Keep technical library names out of the visible interface.

Creating this used no credits or cost other than my Copilot Subscription cost.

Enjoying this article?

Subscribe to get new posts delivered straight to your inbox. No spam, unsubscribe anytime.

No spam. Unsubscribe anytime.

You may also like

See All Posts →

Leave a Comment