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

Interpolate stops when computing thresholds during config building #596

Merged
merged 4 commits into from
Apr 29, 2021
Merged

Interpolate stops when computing thresholds during config building #596

merged 4 commits into from
Apr 29, 2021

Conversation

acshef
Copy link
Contributor

@acshef acshef commented Apr 28, 2021

This is for folks (like myself) that use many colors in their graphs (see cube helix). It's no longer necessary to specify all the stop points in color thresholds (gradients). This paves the way for two more improvements (which are not featured in this PR):

  • Implicitly assuming the first and last stops are the min/max values in the graph (or some other reasonable logic), thereby making all stop points completely optional
  • Allowing for named color patterns (hardcoded into the project), like "rainbow", "cubehelix", "rocket", "mako", etc. (adopting common color patterns already established in other FOSS data visualization projects)

src/buildConfig.js Outdated Show resolved Hide resolved
@kalkih kalkih added the enhancement Something that can be improved label Apr 29, 2021
@kalkih
Copy link
Owner

kalkih commented Apr 29, 2021

Thanks for the PR, looks good, Great feature!
See my comment & lint errors.

Should perhaps think about breaking out threshold related functions from buildConfig.js, but it's fine for now I think.

@kalkih kalkih changed the base branch from master to dev April 29, 2021 17:00
@acshef
Copy link
Contributor Author

acshef commented Apr 29, 2021

Dang, my ESLint in VSCode got turned off. I was flying blind!

@kalkih kalkih merged commit 61e2d62 into kalkih:dev Apr 29, 2021
@acshef
Copy link
Contributor Author

acshef commented Apr 30, 2021

@kalkih I found a bug. Is there a way you can "re-open" the PR? If not, should I open a new PR to master? Or dev?

@kalkih
Copy link
Owner

kalkih commented Apr 30, 2021

No worries, just open another PR towards dev.

@drthanwho
Copy link

Implicitly assuming the first and last stops are the min/max values

Would that mean first and last values that are hardcoded to be considered min/max?
I think it could be useful to be able to assign first and last stops as min and max values for the given hours_to_show. Rather than having to hardcode the values

github-actions bot pushed a commit that referenced this pull request Jan 16, 2022
# [0.11.0-dev.5](v0.11.0-dev.4...v0.11.0-dev.5) (2022-01-16)

### Bug Fixes

* **config:** Remove entity config error [#592](#592) ([#593](#593)) ([b3edf6a](b3edf6a))

### Features

* Interpolate color threshold stops ([#596](#596)) ([61e2d62](61e2d62))
@github-actions
Copy link

🎉 This PR is included in version 0.11.0-dev.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

jlsjonas pushed a commit that referenced this pull request Jan 22, 2022
It's no longer necessary to specify all the stop points in color thresholds (gradients). This paves the way for two more improvements (which are not featured in this PR):

Implicitly assuming the first and last stops are the min/max values in the graph (or some other reasonable logic), thereby making all stop points completely optional
Allowing for named color patterns (hardcoded into the project), like "rainbow", "cubehelix", "rocket", "mako", etc. (adopting common color patterns already established in other FOSS data visualization projects)
jlsjonas pushed a commit that referenced this pull request Jan 22, 2022
# [0.11.0-dev.5](v0.11.0-dev.4...v0.11.0-dev.5) (2022-01-16)

### Bug Fixes

* **config:** Remove entity config error [#592](#592) ([#593](#593)) ([b3edf6a](b3edf6a))

### Features

* Interpolate color threshold stops ([#596](#596)) ([61e2d62](61e2d62))
github-actions bot pushed a commit that referenced this pull request Jan 22, 2022
# [0.11.0](v0.10.0...v0.11.0) (2022-01-22)

### Bug Fixes

* **config:** Remove entity config error [#592](#592) ([#593](#593)) ([53d923a](53d923a))
* display a warning if entity is not available ([#545](#545)) ([a334b84](a334b84)), closes [#487](#487)
* Fix undefined variable introduced by [#545](#545) ([9e923f5](9e923f5))
* Support for `fire-dom-event` ([c29f55f](c29f55f)), closes [#563](#563)
* **log:** color_thresholds render incorectly with logaritmic on ([#542](#542)) ([b704885](b704885)), closes [#531](#531)
* icon will properly follow entity's device_class [[#484](#484)] ([2f9e0a7](2f9e0a7))
* Time would sometime display 24:xx instead of 00:xx [[#536](#536)] ([7c7d921](7c7d921))

### Features

* Interpolate color threshold stops ([#596](#596)) ([3826c0d](3826c0d))
* **attribute:** Retrieve an attribute instead of the state ([#564](#564)) ([708bfde](708bfde)), closes [#411](#411) [#245](#245) [#501](#501)
* **graph:** Add median aggregate function ([#521](#521)) ([57219bd](57219bd))
* Format numbers according to selected language [[#495](#495) [#509](#509)] ([5785bd8](5785bd8))
@bokub
Copy link

bokub commented Feb 8, 2022

I think it could be useful to be able to assign first and last stops as min and max values for the given hours_to_show. Rather than having to hardcode the values

That would be great, yes!

Related: #182

github-actions bot pushed a commit to Malow/mini-graph-card that referenced this pull request Nov 18, 2023
# 1.0.0 (2023-11-18)

### Bug Fixes

* **config:** Remove entity config error [kalkih#592](https://github.com/malow/mini-graph-card/issues/592) ([kalkih#593](https://github.com/malow/mini-graph-card/issues/593)) ([53d923a](53d923a))
* **stalebot:** issues should also use exemptLabels ([4d74c1f](4d74c1f))
* display a warning if entity is not available ([kalkih#545](https://github.com/malow/mini-graph-card/issues/545)) ([a334b84](a334b84)), closes [kalkih#487](https://github.com/malow/mini-graph-card/issues/487)
* Fix undefined variable introduced by [kalkih#545](https://github.com/malow/mini-graph-card/issues/545) ([9e923f5](9e923f5))
* Support for `fire-dom-event` ([c29f55f](c29f55f)), closes [kalkih#563](https://github.com/malow/mini-graph-card/issues/563)
* **log:** color_thresholds render incorectly with logaritmic on ([kalkih#542](https://github.com/malow/mini-graph-card/issues/542)) ([b704885](b704885)), closes [kalkih#531](https://github.com/malow/mini-graph-card/issues/531)
* icon will properly follow entity's device_class [[kalkih#484](https://github.com/malow/mini-graph-card/issues/484)] ([2f9e0a7](2f9e0a7))
* Time would sometime display 24:xx instead of 00:xx [[kalkih#536](https://github.com/malow/mini-graph-card/issues/536)] ([7c7d921](7c7d921))

### Features

* Interpolate color threshold stops ([kalkih#596](https://github.com/malow/mini-graph-card/issues/596)) ([3826c0d](3826c0d))
* **attribute:** Retrieve an attribute instead of the state ([kalkih#564](https://github.com/malow/mini-graph-card/issues/564)) ([708bfde](708bfde)), closes [kalkih#411](https://github.com/malow/mini-graph-card/issues/411) [kalkih#245](https://github.com/malow/mini-graph-card/issues/245) [kalkih#501](https://github.com/malow/mini-graph-card/issues/501)
* **graph:** Add median aggregate function ([kalkih#521](https://github.com/malow/mini-graph-card/issues/521)) ([57219bd](57219bd))
* Format numbers according to selected language [[kalkih#495](https://github.com/malow/mini-graph-card/issues/495) [kalkih#509](https://github.com/malow/mini-graph-card/issues/509)] ([5785bd8](5785bd8))
github-actions bot pushed a commit to Malow/mini-graph-card that referenced this pull request Nov 18, 2023
# 1.0.0 (2023-11-18)

### Bug Fixes

* **config:** Remove entity config error [kalkih#592](https://github.com/malow/mini-graph-card/issues/592) ([kalkih#593](https://github.com/malow/mini-graph-card/issues/593)) ([53d923a](53d923a))
* **stalebot:** issues should also use exemptLabels ([4d74c1f](4d74c1f))
* display a warning if entity is not available ([kalkih#545](https://github.com/malow/mini-graph-card/issues/545)) ([a334b84](a334b84)), closes [kalkih#487](https://github.com/malow/mini-graph-card/issues/487)
* Fix undefined variable introduced by [kalkih#545](https://github.com/malow/mini-graph-card/issues/545) ([9e923f5](9e923f5))
* Support for `fire-dom-event` ([c29f55f](c29f55f)), closes [kalkih#563](https://github.com/malow/mini-graph-card/issues/563)
* **log:** color_thresholds render incorectly with logaritmic on ([kalkih#542](https://github.com/malow/mini-graph-card/issues/542)) ([b704885](b704885)), closes [kalkih#531](https://github.com/malow/mini-graph-card/issues/531)
* icon will properly follow entity's device_class [[kalkih#484](https://github.com/malow/mini-graph-card/issues/484)] ([2f9e0a7](2f9e0a7))
* Time would sometime display 24:xx instead of 00:xx [[kalkih#536](https://github.com/malow/mini-graph-card/issues/536)] ([7c7d921](7c7d921))

### Features

* Interpolate color threshold stops ([kalkih#596](https://github.com/malow/mini-graph-card/issues/596)) ([3826c0d](3826c0d))
* **attribute:** Retrieve an attribute instead of the state ([kalkih#564](https://github.com/malow/mini-graph-card/issues/564)) ([708bfde](708bfde)), closes [kalkih#411](https://github.com/malow/mini-graph-card/issues/411) [kalkih#245](https://github.com/malow/mini-graph-card/issues/245) [kalkih#501](https://github.com/malow/mini-graph-card/issues/501)
* **graph:** Add median aggregate function ([kalkih#521](https://github.com/malow/mini-graph-card/issues/521)) ([57219bd](57219bd))
* Format numbers according to selected language [[kalkih#495](https://github.com/malow/mini-graph-card/issues/495) [kalkih#509](https://github.com/malow/mini-graph-card/issues/509)] ([5785bd8](5785bd8))
github-actions bot pushed a commit to Malow/mini-graph-card that referenced this pull request Nov 18, 2023
# 1.0.0 (2023-11-18)

### Bug Fixes

* **config:** Remove entity config error [kalkih#592](https://github.com/malow/mini-graph-card/issues/592) ([kalkih#593](https://github.com/malow/mini-graph-card/issues/593)) ([53d923a](53d923a))
* **stalebot:** issues should also use exemptLabels ([4d74c1f](4d74c1f))
* display a warning if entity is not available ([kalkih#545](https://github.com/malow/mini-graph-card/issues/545)) ([a334b84](a334b84)), closes [kalkih#487](https://github.com/malow/mini-graph-card/issues/487)
* Fix undefined variable introduced by [kalkih#545](https://github.com/malow/mini-graph-card/issues/545) ([9e923f5](9e923f5))
* Support for `fire-dom-event` ([c29f55f](c29f55f)), closes [kalkih#563](https://github.com/malow/mini-graph-card/issues/563)
* **log:** color_thresholds render incorectly with logaritmic on ([kalkih#542](https://github.com/malow/mini-graph-card/issues/542)) ([b704885](b704885)), closes [kalkih#531](https://github.com/malow/mini-graph-card/issues/531)
* icon will properly follow entity's device_class [[kalkih#484](https://github.com/malow/mini-graph-card/issues/484)] ([2f9e0a7](2f9e0a7))
* Time would sometime display 24:xx instead of 00:xx [[kalkih#536](https://github.com/malow/mini-graph-card/issues/536)] ([7c7d921](7c7d921))

### Features

* Interpolate color threshold stops ([kalkih#596](https://github.com/malow/mini-graph-card/issues/596)) ([3826c0d](3826c0d))
* **attribute:** Retrieve an attribute instead of the state ([kalkih#564](https://github.com/malow/mini-graph-card/issues/564)) ([708bfde](708bfde)), closes [kalkih#411](https://github.com/malow/mini-graph-card/issues/411) [kalkih#245](https://github.com/malow/mini-graph-card/issues/245) [kalkih#501](https://github.com/malow/mini-graph-card/issues/501)
* **graph:** Add median aggregate function ([kalkih#521](https://github.com/malow/mini-graph-card/issues/521)) ([57219bd](57219bd))
* Format numbers according to selected language [[kalkih#495](https://github.com/malow/mini-graph-card/issues/495) [kalkih#509](https://github.com/malow/mini-graph-card/issues/509)] ([5785bd8](5785bd8))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something that can be improved released on @dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants