AuthorChanging theme in parent Posts
I have found an issue with your jqxGauge widget.
When jqxGauge is hosted by some other widget (e.g. jqxPanel, splitter, etc), changing the host’s theme property calls setTheme() for all child element, which causes exception when jqxGauge element is processed.
This is because jqxGauge has a child with className set to SVGAnimatedString. SVGAnimatedString doesn’t have splice() method and this is what causes the exception.
I understand that you may or may not fix this in next release, but could you please at least suggest some workaround?
Thanks in advance.
Thank you for quick response.
You are right, the demo sample you provided doesn’t throw any exception. The only thing is that your sample is using jQuery v1.10 and I am using v1.11.3, but I don’t see how this could break it.
I’ll try to simplify the code here to see if it makes any difference. Will get back to this thread if I find the cause.
Great stuff these widgets by the way.
The gauge is inside navigation bar, which is inside a splitter.
Any chance to get some feedback on this any time soon?
You have to initialize jqxGauge in initContent callback of your NavigationBar.
Some of the widgets have this callback, so you have to use it to prevent problems.
Unfortunately, your suggestion doesn’t work. I have updated the original jsFiddle, so you can see it yourself.
By the way, as I mentioned in my first post, the origin of this TypeError is in setTheme() function (file: jqxcore.js, line: 886). There you are trying to split className of DOM element.
var classNames = element.className.split(' ')
In case of jqxGauge (or jqxChart) widget, one of child elements has SVGAnimatedString object as className and it doesn’t have split() method.
If you still think initialising jqxGauge in initContent callback will solve this problem, kindly provide a jsFiddle that demonstrates this.
Thank you very much Ivailo.
Your suggested workaround does the trick. I hope you address this bug in one of your future releases.
You must be logged in to reply to this topic.