Skip to main content
100%

Candlestick

✓ Published0🌍 Public
AAriel Fuggini
Last edited Jan 27, 2023
Created on Jan 27, 2023
Forked from HTML Starter

This example displays a candlestick chart, a financial visualization showing the open, high, low, and close prices for a series of dates. The code renders five candlesticks as SVG rectangles for the price range between open and close, with vertical lines for the high and low extremes. The chart uses d3.scaleTime and d3.scaleLinear to map dates and prices to the 600 by 400 pixel canvas, and d3.axisBottom and d3.axisLeft to draw the axes. Each candlestick is colored green or red via CSS classes based on whether the closing price is higher or lower than the opening price.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes