Feature #4358
closedConsider updating interactive WCartesianChart tooltip locations on zoom/pan
0%
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
Updated by Bruce Toll over 9 years ago
- File 0006-Updated-comment-on-tooltip-limitation.patch 0006-Updated-comment-on-tooltip-limitation.patch added
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.
Updated by Koen Deforche about 9 years ago
- Status changed from Resolved to Closed