Skip to main content
Public

Share visualization

Loading preview…

Bar Graph shows Sales of Fruits in USD

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Bar Graph shows Sales of Fruits in USD

0
RRadhakrishna246
Last edited Mar 27, 2022
Created on Mar 6, 2022

This example shows a horizontal bar chart of fruit sales in USD, with bars extending from left to right to compare each fruit’s revenue. The code loads data from an external CSV file and multiplies the sales values by ten during preprocessing, then renders SVG rectangles using D3 v7’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`. The visualization is drawn as SVG elements within a fixed 960×500 viewport, with axis labels for “Fruits” and “Sales in USD” added via text elements.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed