CANVE / canve-viz

CANVE visualizer UI
3 stars 1 forks source link

Make the node and edge styles not domain specific #45

Open danielabar opened 8 years ago

danielabar commented 8 years ago

Currently some of the code is specific to a Scala or programming project. But in the future, this could be used to visualize other domains, for example a set of Docker containers, build steps, maven dependencies.

This should be made more generic, especially the node and edge style classes.

One possibility could be to scan the entire graph on first load and dynamically generate the styles based on distinct node and edge types.

Or preset templates/config for type of project.

danielabar commented 8 years ago

Some notes from @matanster in gitter discussion:

So for not-domain-specificity sake, this mapping there can be a custom mapping, whereas the default mapping would just select, arbitrarily, colors for edge types ― evenly spaced on the color spectrum ― per the number of edge types there is in the data. I think there's a unique method or something like it in ES6 for getting the number of unique values from the data, for getting the number of edge types. So if there's say 3 edges, the color difference between each type can be huge, whereas if there's 8 or 9, the color differences are smaller, basically dividing over the pleasantly visible spectrum of color, while thinking of not using colors that are indiscernible from whatever background color there is. To aid in that, d3 has color interpolation functions, which help generate colors for such a technique. (when I mention d3 there, I don't mean anything of d3 need be used, other than a color api function of your choice from it.. which may otherwise exist in other libraries/framework/native ES6