Task2Ques1
This stacked bar chart shows annual price trends for five car models from 2020 to 2024, using color-coded segments to compare values across years and models. It loads CSV data via d3.csv, builds the chart with d3.stack, scales with d3.scaleBand and d3.scaleLinear, and assigns colors using d3.scaleOrdinal with d3.schemeCategory10. The SVG renders axes via d3.axisBottom and d3.axisLeft, and includes a legend generated from the data columns.
AI-generated descriptionThis stacked bar chart visualizes the annual price trends of selected car models from 2020 to 2024, offering insights into how car prices have evolved over time. Each segment in the bars represents the car price for a specific year, color-coded for clear differentiation. The chart aims to provide an easy comparison across years and models, highlighting trends and shifts in the automotive market.