I don't have a MWE for this, as it mostly deals with the preprocessing of data prior to writing D3 code.

I have a `.csv` file which is essentially structured as follows:

```
category,value,date
cat1,200000,2016-08-07
cat2,500000,2016-08-07
cat3,600000,2016-08-07
cat1,200000,2016-09-07
cat2,500000,2016-09-07
cat3,600000,2016-09-07

```

and so forth. The task is to draw a line graph for each one of `cat1`, `cat2`, and `cat3` with the x-axis being the date and the y-axis being the value. From every example I've found, the solution appears to be that there must be one date per row:

```
date,cat1,cat2,cat3
2016-08-07,200000,500000,600000
2016-09-07,200000,500000,600000

```

which makes sense. However, let's suppose that `cat1`, `cat2`, and `cat3` have required colors that must be associated with them. For example, suppose that the line for `cat1` must have color `#4472C4`, the line for `cat2` must have color `#ED7D31`, and the line for `cat3` must have color `#FFC000`.

What is the best way to structure the data above to not only easily plot the lines, but to associate each line with a specified color?

If a MWE is preferred, please let me know, and I will delete this question until I have a sufficient MWE prepared.