Closed baderas closed 7 years ago
I try to explain further what my idea was on https://tsdbbench.github.io/Ultimate-TSDB-Comparison/ as example.
Up to now we have three colors for labels in UC, for "good" "warn" and "bad" (or something like that). But when adding features to categories (translated in labels to tags), for example timeseries functions ("functions" columnm marked with an arrow) in the example above, it looks like this:
I could now use three colors to color each function manually. But what i want is to have an own color for each function, as shown here for every label for every tag (for example purposes I just overdraw each element, but of course the background color of each label should change):
This could be done in an automated way since the colors have no semantic besides grouping labels together (e.g. the INS function has the same color for every time series database). Therefore UC could choose a color automatically at the build stage and use it statically for every pageview (so that the colors stay the same). This would really speedup creating such type of UC, since coloring can be done automatically without the user choosing and setting colors manually, which can be quite time intensive.
The automatic color choosing could further be done in a smart way, so that each chosen color is different enough from other colors, so that the difference between labels are easyily recognizable. Only if there are no more colors left that are different enough, intermediate colors should be chosen. Also grey should be rethinked and maybe not used when everything else is colorized, since it may look like something is "not active" or "does not function" (greyed out).
The user should choose for every tag (=column) if it is a good/warn/bad tag or a feature tag. If it is a good/warn/bad tag, the behaviour stays the same as it is now. If it is a feature tag, the user can chose if he wants to colors manually or if the colors should be applied automatically to the labels of this tag.
Hope that helps 👍
I submitted a PR (#48) that implements the primitive version. Automatic coloring is controlled by adding classes or colors to values. The predefined classes still exist, but the user has to add them manually to values.
I think the colors should be chosen in another way. Instead of using "label-success" etc. do choose color, I would prefer to have the possibility to enter a color (by name and/or #000000). Labels like "label-success" are also not self describing, as it is not clear what color this results in.