Skip to main content
100%

Bullet Chart with automatic updating v7

✓ Published0🌍 Public
Dd3noob
Last edited Jun 19, 2021
Created on Jun 19, 2021

This example shows two bullet charts for CPU Load and Memory Used that update automatically every three seconds. The charts use the D3.js v7 library with a custom `d3.bullet` function that defines ranges, measures, and markers as horizontal bars and lines. Data loads from an external JSON file, and a `setInterval` triggers a randomized update of the measure and marker values. Transitions with a one-second duration animate the changes using `transition.attr` for width and position.

AI-generated description

This is a simple example of a bullet chart derived from Mike Bostock's example and updated to work with d3.js v7

The code for the bullet.js script was parsed from Martin Meier's v4 code here.

This version updates automatically from a randomised source.

mit Licensed

Similar vizzes