Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Null color picker #24

Merged
merged 12 commits into from Apr 9, 2021
Merged

Conversation

KatrinaTurner
Copy link
Contributor

Allows you to choose what color is used to fill buckets in the heatmap that have NO data as opposed to data values of 0.

Copy link
Owner

@marcusolsson marcusolsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks really clean 👍

I'll make sure to test this during the weekend so we can get this merged! In the meantime, would you mind adding docs for this in the README?

Also, did you make any changes to the .gitignore? Seems to be only whitespace changes? If this was unintentional, could you revert it?

src/module.ts Outdated Show resolved Hide resolved
@@ -97,6 +97,11 @@ export const plugin = getPanelPluginOrFallback(
showIf: (config: HeatmapFieldConfig) =>
config.colorPalette !== 'custom' && config.colorPalette !== 'fieldOptions',
})
.addColorPicker({
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to check in which version of Grafana the color picker option was added. Currently, the plugin can run on >=7.0.3, but we might need to bump the required minimum required version depending on when this was introduced.

@KatrinaTurner
Copy link
Contributor Author

Thank you! I added a description into the README and reverted the .gitignore changes, they were unintentional.

Copy link
Owner

@marcusolsson marcusolsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this and it seems to work great even on 7.0.3, so no version bump needed! 🎉

It seems like your editor might change the whitespace in the edited files (like the README.md and gitignore). Are you perhaps using Windows? I'm not entirely sure, but your git client might be set up to commit Windows-style line endings.

I recommend that you look into it to make it easier to work on cross-platform projects. But if you don't have the time to look into it right now, you could revert the README.md changes and I'll add your docs update in a separate commit.

Can't wait to merge this!

@KatrinaTurner
Copy link
Contributor Author

Hi! Yes I am on Windows, I forgot to change the settings for the line endings. Sorry about that! I just fixed it and pushed.
Yay! Glad it works on 7.0.3! :)

Copy link
Owner

@marcusolsson marcusolsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! 🎉

@marcusolsson marcusolsson merged commit f1b8aa6 into marcusolsson:main Apr 9, 2021
@marcusolsson marcusolsson linked an issue Apr 11, 2021 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Color option for null values
2 participants