Skip to main content
100%

Bar Chart

✓ Published0🌍 Public
Xxieyunli111
Last edited Jul 18, 2022
Created on Jul 17, 2022

This example presents a bar chart of option prices, displaying each financial instrument’s code on the y-axis and its price on the x-axis. The visualization uses React with D3 v5, parsing data from a CSV file and rendering SVG rectangles. It employs `scaleLinear` for the x-axis, `scaleBand` for the y-axis, and `axisLeft` to generate tick labels, all within a custom `render` function. The data source is `data.csv`, containing option codes and prices, which are multiplied by 100 during preprocessing.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

index.js first parse the data then define the render()

MIT Licensed

Similar vizzes