Skip to main content
100%

Multi-series Associative

✓ Published0🌍 Public
Dd3noob
Last edited Nov 30, 2019
Created on Oct 14, 2014

This example shows a multi-series line chart where three cities' temperature measurements are plotted over time, with each city distinguished by a different colored line. The visualization uses an associative array structure to map city names to their temperature values from the CSV data. The code constructs the chart using D3.js version 3.5.17, employing `d3.time.scale` for the x-axis dates and `d3.scale.linear` for the y-axis, while `d3.scale.ordinal` assigns distinct colors to each series. Lines are drawn with `d3.svg.line`, and the grid lines are created through a custom y-axis with negative tick sizes. The rendering is SVG-based, with the data sourced from the included `data.csv` file.

AI-generated description

Added as an example for the question asked here on Stack Overflow.

mit Licensed

Similar vizzes