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
Heatmap widget #577
base: main
Are you sure you want to change the base?
Heatmap widget #577
Conversation
@joepavitt - Please consider what is the rationale in making this a core node, instead of a contrib node? |
Reasonable question - my initial motivations for the decision was that it's a general type of visualisation, and is consistent with how it interacts and behaves with our other core nodes (Charts and Gauge) in that regard. We also discussed Similarly, I've been asked many times to include UI LED (#550) as a core node, but I want that to remain third-party as it's particular to Home Automation and/or Manufacturing, and doesn't represent a generalized tool/widget that could have multiple use cases. I do understand the concern though, this wouldn't be a "popular" node like
We do have the Example project for this, and there is an in-progress and very nearly ready third party widget for Webcam integration |
Co-authored-by: Zeger-Jan van de Weg <ZJvandeWeg@users.noreply.github.com>
@bartbutenaers and I have spoken about @Paul-Reed's feedback, and agreed that this will serve better as a third-party widget. As such, @bartbutenaers will open a new repo under his ownership, and we'll assist with any migration/changes required in order to make it compatible, as there are some minor differences between core and third-party widgets. |
Description
As discussed with @joepavitt, this pull request is an attempt to migrate my node-red-contrib-ui-heatmap from D1 to D2, but now as a core UI node.
Demo:
Demo flow included as a file, because it contains a base64 encoded image and was not accepted by Github in this readme:
demo_flow.json
My old ui node was based on the heatmap.js, but that is not maintained anymore for about 8 years. Therefore I have used the visual-heatmap library for this one. The author of that node has been very helpfull! P.S. His visualHeatmap.esm.min.js file is about 16KB large.
TODO's:
Detail: I wanted to draw it on top of the visual-heatmap canvas, however it has a webgl context which does not support fonts. Therefore the author of the visual-heatmap node has provided me another solution (see demo). However it is based on his i2djs library, and that minified file is 237KB large. Not sure if that is acceptable. If we could have a canvas on top of the heatmap (which resizes the same way) that might be a better solution perhaps...
Question: when you injected an array of numeric values into my old ui node, these points were rendered from top to bottom and left to right (i.e. vertical columns). Now with this node they are rendered from left to right and top to bottom (i.e. horizontal lines). I could change it to make it more the same as in the old node, but I think it is more intuitive to do it this way?
P.S. I have not added unit tests, simply due to a severe lack of free time...
Related Issue(s)
See issue.
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
backport
labelarea:migration
label