Closed sillyfrog closed 6 years ago
I see you are working on this at the same time :)
I have tried to resolve the merge conflicts - hopefully you'll know if this works of the top of your head. I had ensure I had ng-change="ctrl.refresh()"
in editor.html for things to update correctly - I'm hoping with won't mess with the sorting (but the sorting may mess with things if using Math).
Hi sillyfrog,
I think this would work perfectly if you are able to evaluate the math first and then return the number result to the auto sort. So auto sort will still work alongside the queries inside the thresholds.
Closing this one, I created a new PR that will also support sorting.
Thanks sillyfrog, very useful functionality added! How difficult would it be to change the min and max fields to dynamic values too in the same fashion?
@jfoxe Shouldn't be too hard I think. I'll check it out and see if I can add it to my current PR.
This PR adds support for using the Math feature in the Thresholds. This way you can dynamicially update the thresholds based on incoming data.
My use case is battery charge level, based on solar system output. The main bar in the chart is the current level, and the threshold shows the current target charge level.
My first time using TypeScript, so please excuse any newbie mistakes.