I created a new knob control widget on ThingsBoard
using external JavaScript resources.
External JavaScript resources are:
https://code.jquery.com/jquery-1.9.0.js and
https://cdnjs.cloudflare.com/ajax/libs/jQuery-Knob/1.2.13/jquery.knob.min.js
JavaScript:
self.onInit = function() {
var $j=jQuery.noConflict();
$j(".knob").knob();
}
HTML:
<div class=container>
<input class="knob" data-angleOffset=-125 data-angleArc=250 data-fgColor="#66CC66" value="50">
</div>
The widget works well on its own. However, when added to the Dashboard, it causes errors to other existing widgets also on the same dashboard.
As seen from the image attached, the newKnobControl
(which is the custom widget I created) is displayed and working.
However, the existing built-in knob control widget on ThingsBoard can no longer display properly and there is also an error with displaying the TimeSeries bars.
Timeseries Bars error stated as: Widget Error: TypeError: $.plot is not a function.
So, question is how can I add my custom widget to the same Dashboard as existing built-in widgets without causing errors to them?