CS 725/825 - Spring 2018 - Homework 3 - Bar Chart
Varsha Ravi-01067335
This simple bar chart is constructed from a TSV file storing the frequency of letters in the English language.
Graph 1 - In graph 1 Color hue was applied to get different colors for each alphabet. This could be obtained using colorScale = d3.scaleOrdinal(d3.schemeCategory20); , but this provides only 20 set of colors and the colors will be repeated for the next 6 colors as the loop repeats. Thus the data set has been called using .domain and then using range 26 different colors have been assigned.
Graph 2 - In Graph 2 color saturation was applied to get saturation of clors from darker shade to lighter shade to the highest to lowest frequency respectively.
References:
https://d3js.org/d3.v4.min.js
https://d3js.org/d3-scale-chromatic.v1.min.js