eventlog2html
eventlog2html copied to clipboard
Colours in cost centre view should match colours in the other charts
At one point in time, the colours in the cost centre view matched up with the colours in the main chart. In more recent times, I changed the colour ordering of the main charts to be ordered by the k
value, but didn't update the cost centre chart to reflect this new colour ordering.
I tried to do this quickly but applying the colour scheme in vega is a bit more complicated than in vega-lite. In particular, if you try modifying Eventlog/Trie.hs
to include the band identifier (the first component of the triple) then it is included in the vega output as an integer and hence is a continuous scale. Therefore the ordinal scales don't work and you need to transform the data first before
- Modify
Eventlog/Trie.hs
to include the band identifier in the cost centre data output. - Modify
javascript/ccmap.vg
to apply the colour scheme correctly.
A good way to experiment here is to render the chart and then click on the dropdown in the top-right and open the cost centre chart in the vega editor. Then you can quickly play around with the different scale options with a live visualisation.