Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colours in cost centre view should match colours in the other charts #122

Open
mpickering opened this issue Mar 31, 2020 · 0 comments
Open

Comments

@mpickering
Copy link
Owner

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

  1. Modify Eventlog/Trie.hs to include the band identifier in the cost centre data output.
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant