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

Add categorical colors #64

Merged

Conversation

JonasProgrammer
Copy link

As requested in #20, we have decided to rebase our additions to the plugin on this fork, as it seems much more actively maintained and stable -- so first of all, thank you for providing this to the community.

This PR implements a simple approach to allow the circles to be colored by category (defined by their Label-field) rather than numeric thresholds. The purpose of this feature is to allow the worldmap-panel to be used in situations where different objects are being tracked over time, rather than aggregating data for fixed locations.

The code is modeled after the existing threshold approach, adding a dispatch layer where appropriate, which unfortunately also means it inherits its weaknesses (such as abusing data for the split thresholds and categories). This is certainly not ideal, but remodeling the whole settings-part in a backwards compatible way seemed to excessive for this small addition of functionality.

- color mode can be switched between threshold (default/fallback) and categories
- categories are based on the datapoint's locationName field
@amotl
Copy link

amotl commented Jun 17, 2020

Dear Jonas,

this is huge, thanks a bunch for your contribution and for taking the time to rebase your improvements on our fork.

As you also touched the tests and added some more for covering the new features, I believe there's no reason to hesitate merging the improvements. I will try to merge them right away within the next iteration and cut a new release afterwards.

With kind regards,
Andreas.

@amotl
Copy link

amotl commented Oct 26, 2020

Dear Jonas,

super sorry for the late reply. Several things have prevented me keeping up with maintenance. Now, after @robouden and @matschaffer slightly pushed me to release 0.10.0 (thanks again!), I will integrate your improvements and release 0.11.0 right away.

With kind regards,
Andreas.

@amotl amotl merged commit e0e00b0 into grafana-toolbox:develop Oct 26, 2020
@robouden
Copy link

The "pleasure" is ours.
Your work is great.!!

regards,
rob

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

Successfully merging this pull request may close these issues.

3 participants