Project

General

Profile

Actions

Feature #4358

closed

Consider updating interactive WCartesianChart tooltip locations on zoom/pan

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

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

0%

Estimated time:

Description

Following-up on the suggestion in #4297, I've attached a set of patches for your consideration.

The first file provides basic support for updating the map areas in an interactive WCartesianChart. It complements the recent enhancements that provide optional client-side interactive zoom/pan in WCartesianChart. The new feature is activated automatically on interactive charts with tooltips.

The second file addresses a performance issue in the original patch. With more than a few hundred tooltips, interactive performance gets unacceptably slow with some browsers, e.g. Firefox. The second patch waits a short time for user input/animation to stabilize before updating the area coords in batches. Since it adds some complexity, I kept it separate so the first patch would be easier to review. The patch contains some commented out logging statements that were helpful in verifying correct operation. They can be removed.

The third file addresses an accuracy issue in the original patch. The HTML area coords are defined to be integer values and the subclasses of WAbstractArea likewise store their values as integers. However, this causes an issue when zooming in as there is less resolution available than for the charted points so the area and the point tend to drift apart at higher zoom levels. The third patch updates the subclasses of WCartesianChart to use doubles internally so that the remapping can be carried out with greater precision. There may be some Java-related issues with this patch....

The fourth file is a small update to the ChartsExample that provides additional tooltips for testing.

As usual, minified javascript has not been included.

The patch has been lightly tested with the latest github version of Wt, 3.3.3-82-g7b990a7. Each of the patches has additional notes. Please feel free to modify as you see fit.


Files

Actions #1

Updated by Bruce Toll over 9 years ago

I've attached an additional patch file (0006-Updated-comment-on-tooltip-limitation.patch) that removes a documentation note that is no longer needed once this set of patches has been applied.

Actions #2

Updated by Wim Dumon over 9 years ago

  • Assignee set to Roel Standaert
Actions #3

Updated by Roel Standaert about 9 years ago

  • Status changed from New to Resolved
Actions #4

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions #5

Updated by Koen Deforche about 9 years ago

  • Target version set to 3.3.5
Actions

Also available in: Atom PDF