Skip to main content
100%

Medicine Inventory Chart

✓ Published0🌍 Public
UUVarshaReddy
Last edited Jul 21, 2023
Created on Jul 20, 2023
Forked from Hello VizHub

This example shows the quantity of five medicines in a bar chart, with yellow bars representing each inventory level and value labels placed above them. The implementation uses D3 v6 to build the SVG visualization, employing d3.scaleBand for the categorical x-axis, d3.scaleLinear for the y-axis, and d3.axisBottom and d3.axisLeft to render the chart axes. Static data is hardcoded in the HTML, and the chart includes rotated x-axis labels for readability. The code demonstrates core D3 data-joining patterns with selectAll, enter, and append to create the bars.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes