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 )
{
parentDiv.id = "charthere";
this.m_chart = new FusionCharts({type: 'line'});
this.m_chart.height= '100%';
this.m_chart.width='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.
Cheers
Jim
Widget Woes (RESOLVED)
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: Widget Woes
You just needed a second pair of eyes 
this.m_chart instead of this.chart
Cheers,
Danny
this.m_chart instead of this.chart
Cheers,
Danny
Re: Widget Woes
Doh!
Thanks Danny. When you're dealing with stuff your half understand you expect difficult problems not dumb ones!
Have a great weekend
Thanks Danny. When you're dealing with stuff your half understand you expect difficult problems not dumb ones!
Have a great weekend