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

section, minvalue, maxvalue update problems #35

Open
001alessandro1964 opened this issue Oct 1, 2021 · 0 comments
Open

section, minvalue, maxvalue update problems #35

001alessandro1964 opened this issue Oct 1, 2021 · 0 comments

Comments

@001alessandro1964
Copy link

Hi,
I use node-red and I need to update section definition, maxvalue and minvalue of my gauge radial.
I set new value but nothing happend.
To update my gaugeradial with new configurations I must change tab and return to the tab where is my gauge,
now I can see a correct visualization of section, maxvalue and minvalue.
Any ideas?
Best Regards,

This is my code in an edit template node:

<script src="/myjs/tween-min.js"></script> <script src="/myjs/steelseries-min.js"></script> <script> var min_value_in; var max_value_in; var allarme_inf_in; var allarme_sup_in; var sections_p_in; var P_in; (function(scope){ scope.$watch('msg', function(msg) { if (typeof(msg.minvalue_in) != "undefined") min_value_in = msg.minvalue_in; if (typeof(msg.maxvalue_in) != "undefined") max_value_in = msg.maxvalue_in; if (typeof(msg.allarme_inf_in) != "undefined") allarme_inf_in = msg.allarme_inf_in; if (typeof(msg.allarme_sup_in) != "undefined") allarme_sup_in = msg.allarme_sup_in; if (typeof(msg.value_in) != "undefined") P_in.setValueAnimated(msg.value_in); }); })(scope); P_in = new steelseries.Radial('P_in', { gaugeType: steelseries.GaugeType.TYPE5, size: 190, section: [steelseries.Section(min_value_in, allarme_inf_in, 'red'), steelseries.Section(allarme_inf_in, allarme_sup_in, 'green'), steelseries.Section(allarme_sup_in, max_value_in, 'red') ], // area: areas_p_in, titleString: "P_in", unitString: "bar", threshold: allarme_inf_in, minValue: min_value_in, maxValue: max_value_in, thresholdRising: false, lcdVisible: true, }); P_in.setFrameDesign(steelseries.FrameDesign.STEEL); P_in.setPointerType(steelseries.PointerType.TYPE6); P_in.setForegroundType(steelseries.ForegroundType.TYPE4); P_in.setValueAnimated(0); </script>


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

No branches or pull requests

1 participant