Project

General

Profile

Actions

Bug #4495

closed

WCartesianCharts with tooltips fail with javascript error

Added by Bruce Toll about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
Start date:
10/04/2015
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by Bruce Toll about 9 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.

Actions #2

Updated by Roel Standaert about 9 years ago

  • Status changed from New to Resolved
Actions #3

Updated by Bruce Toll about 9 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.

Actions #4

Updated by Koen Deforche about 9 years ago

  • Assignee set to Roel Standaert
  • Target version set to 3.3.5
Actions #5

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF