Page 1 of 1

Widget Woes (RESOLVED)

Posted: Fri Aug 23, 2019 5:30 pm
by soa
I'm trying to implement a widget around FushionCharts - a popular charting js library we've being using for years. I can get it to display something if put all the code in the onRealizeControl but that's not realistic for real world use. I have

PROTOTYPE.onRealizeControl = function( parentDiv )
{ = "charthere";

this.m_chart = new FusionCharts({type: 'line'});
this.m_chart.height= '100%';

and later

PROTOTYPE.UpdateXML = function()
this.chart.setXMLData('some XML');


This produces the error

Cannot read property 'setXMLData' of undefined

It can't seem to find this.chart even though it was created at onRealizeControl.

I'm a bit in the dark, any suggestions would be great.


Re: Widget Woes

Posted: Fri Aug 23, 2019 6:29 pm
by dannyoorburg
You just needed a second pair of eyes 😉

this.m_chart instead of this.chart


Re: Widget Woes

Posted: Fri Aug 23, 2019 7:16 pm
by soa

Thanks Danny. When you're dealing with stuff your half understand you expect difficult problems not dumb ones!

Have a great weekend