Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cosmetics Line Chart

Public visualization

Viewing a saved revision (read-only)

7fe25b5885e24ca1bc4364a70f190bf0

Cosmetics Line Chart

0 stars0🌍 Public

This example shows a line chart of cosmetic product prices, plotting each product’s price in US dollars against its index position in the dataset. The chart uses D3.js v7 to load CSV data, then renders an SVG line with a steelblue stroke, along with axes and labels. The y-axis domain is dynamically adjusted with a transition to shift the line upward after initial drawing, while the x-axis uses a linear scale based on the data index. The code applies SVG transitions in this final adjustment.

AI-generated description