Export Image
Export Code

Line Chart Using a Qualitative Color Scale with D3

Olga

Last edited Apr 18, 2022
Created on Mar 08, 2022

Assignment 6 part A+

Line chart with at least 4 separate lines colored using a qualitative color scale with the appropriate legend.

I've generated and used this color schema: https://colorbrewer2.org/?type=qualitative&scheme=Set1&n=8 but later I've got that I can load colors directly fromt the https://colorbrewer2.org/export/colorbrewer.js and use in the code.

Provided example refers to the v3 of D3 and some of the methods mentioned are deprecated, e.g. scale.category10. Also http should be changed to https in order colorbrew to work.

documentation https://github.com/d3/d3/blob/main/API.md

MIT Licensed