Skip to main content
100%

multiseries line chart

✓ Published1🌍 Public
119h61a05c9@cvsr.ac.in
Last edited Oct 19, 2025
Created on Oct 19, 2025
Forked from D3 Starter

This multi-series line chart shows daily sales for Products A, B, and C over the first several months of 2025, with each product’s trend drawn as a separate colored line for comparison. A monetary annotation highlights the peak for Product A. A second chart uses a combo format, rendering daily advertising budget as gray bars and profit margin as a black monotone curve, with a dual y-axis for the two distinct scales. The code uses d3-based functions like `d3.timeParse`, `d3.scaleTime`, `d3.line` with `curveMonotoneX`, and `d3.axisBottom`, with data loaded from a CSV file via `d3.csv`. Both charts are rendered as SVG elements.

AI-generated description
MIT Licensed

Similar vizzes

Loading thumbnail…

Multi-Series Line Chart With Two Y-axis

This example shows a multi-series line chart comparing daily sales for two products, Product A and Product B, over a period in September 2017. The chart uses two y-axes to accommodate the different scales of the two series, with the left axis for Product A sales and the right axis for Product B sales. The data is loaded from an embedded JavaScript array and bound to SVG paths, with D3 v4 handling the scales, axes, and line generation. A tooltip provides on-hover details about the batch ID, product name, and sales values. The visualization is rendered with SVG and includes a resize listener to adapt the chart dimensions to the window. The color scheme distinguishes the two series (red for Product A, green for Product B), and the chart is designed to be responsive within its container.This multi-series line chart compares daily sales for two products using dual y-axes to handle their different scales. Product A sales (red line) are plotted against the left axis, while Product B sales (green line) use the right axis. The x-axis displays dates over a three-week period in September 2017. Built with D3 v4 and rendered as SVG, the chart includes a legend, axis labels, and an interactive tooltip that appears on hover to display the batch ID and sales values. The visualization also supports window resizing, and its clean, dual-axis design makes it easy to compare the trends of the two product lines despite their differing magnitudes.

663anp3ca
82% match