collecobrary
collecobrary copied to clipboard
Refactor d3 digraph code
Right now the d3 digraph code is embedded in the DegreeMap.vue component.
It is not very clean and I think it would be better if we refactor the code to be a separate script.
This would help in case we want to use the digraph in another place.
With the addition of the sidebar, I think we should extract the color map from the degree-map so it is easier to pass as a prop to both the sidebar and digraph instead of emitting the data up the component hierarchy and back down whenever we want to make a lateral transfer.
We should also pull out data parsing into its own module because this interface might change as we change how we store our course data.