Bug #4495
closedWCartesianCharts with tooltips fail with javascript error
0%
Description
Attempts to display either interactive or non-interactive WCartesianCharts with tooltips fail with javascript errors. This is with github version 3.3.5-rc1-22-g3605541.
An attached patch to ChartExamples.C adds tooltips and can be used to demonstrate the issue.
Disabling lines 655 and 713 in WPaintedWidget.C [// ss << widget_->objJsRef() << ".repaint();";] helps with the interactive case, but causes other problems.
The non-interactive case can be demonstrated by disabling the interactive features (setZoomEnabled, setPanEnabled, setCrosshairEnabled) in ChartExamples.C.
NOTE: WPaintedWidget.C may be setting hasJsObjects true even when a WCartesianChart is not interactive. I'm not sure if this is intended.
Files
Updated by Bruce Toll almost 10 years ago
Some additional notes:
JavaScript error: {""exception_description"":""Cannot read property 'nodeName' of null"",...
I believe the error is in jquery.extend.data(elem, name, data), where elem is null (line 1300 in jquery.js) and this is called from the last statement in the generated repaint function: jQuery.data(Wt3_3_5.$('xxxx'), 'obj').updateAreas();
At the time repaint() is called, the xxxx element has not yet been initialized by WImage.js.
Hope this helps. I wasn't sure the best approach for providing a patch. Checking for initialization would avoid the JS error, but might leave the area map out of sync if there was an initial zoom or pan.
Updated by Roel Standaert almost 10 years ago
- Status changed from New to Resolved
Updated by Bruce Toll almost 10 years ago
Thanks for fixing this so quickly. The updated version on github works great with the example provided. In testing with layouts, however, I came across a problem that may be related. It has been filed as #4510.
Updated by Koen Deforche over 9 years ago
- Assignee set to Roel Standaert
- Target version set to 3.3.5
Updated by Koen Deforche over 9 years ago
- Status changed from Resolved to Closed