Opened 10 years ago
Closed 10 years ago
#12392 closed enhancement (fixed)
[patch][ccla] Provides a interaction framework for charting with mouse & touch zoom and pan interactions
Reported by: | cjolif | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Charting | Version: | 1.6.0rc1 |
Keywords: | 1.7-mobile | Cc: | |
Blocked By: | Blocking: |
Description
This patch is providing an interaction framework for charting. Current action2d package is interacting with data item in the chart plots. Here we talk about interacting with the chart itself (zoom etc..).
The patch provides:
- The framework itself (mimic on action2d but called interaction2d an targeting the chart itself). This includes the ability for the chart widget to instantiate the interactions from div.
- Predefined zoom & pan interaction for mouse (including mouse wheel) + touch interaction (including double tap)
- Some coordinate management utilities in plot2d/Base.js that are useful for interactions.
- A getPlot method on Chart.js
- A small "fix" in Tooltip.js to use chart getCoords() method instead of redoing the same thing.
- new tests/tests modifications
More interactions can be added later on.
See also mobile charting enhancement document: https://docs.google.com/document/d/1WM1UeXGZKgUSzL94TzRbr3dNEHiMzSJvy7pZep8yyAw/edit?hl=fr&authkey=CL7IjbIM
Attachments (4)
Change History (12)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Ok, that was caused by a "\ No newline at end of file" line output in the patch by eclipse. Removing that line makes it work.
comment:3 Changed 10 years ago by
Type: | defect → enhancement |
---|
comment:4 Changed 10 years ago by
Milestone: | tbd → 1.7 |
---|
comment:5 Changed 10 years ago by
The new attachment (interaction01.patch) is superseding the previous patch (to be attached later). It contains a few improvements on previous interactions (ability to get some part of the interaction under option) plus two new interactions:
- a mouse based data indicator
- a touch based data indicator
They display a vertical (for horizontal chart) bar at the nearest data under the point with a tip describing the data. The touch based version support double touch interaction displaying the data change between the two touch points.
Examples/tests are included.
comment:6 follow-up: 7 Changed 10 years ago by
Note: this patch is causing issues on iOS/SVG when zooming or panning over a "filled" chart (area chart, column chart) because iOS seems to have an issue with touch events being "lost" if the target (here the area for example) is removed from the DOM while touching the screen. I'm currently implementing a workaround based on a glass view in charge of being the target.
comment:7 Changed 10 years ago by
Replying to cjolif:
Note: this patch is causing issues on iOS/SVG when zooming or panning over a "filled" chart (area chart, column chart) because iOS seems to have an issue with touch events being "lost" if the target (here the area for example) is removed from the DOM while touching the screen. I'm currently implementing a workaround based on a glass view in charge of being the target.
These issues are now fixed in latest version.
Changed 10 years ago by
Attachment: | interaction01.patch added |
---|
Changed 10 years ago by
Attachment: | interaction01.2.patch added |
---|
Version with new options on mouse interaction (keyboard+ double click zoom)
Changed 10 years ago by
Attachment: | interaction01.3.patch added |
---|
New patch with previous enhancement + refactoring to action2d + IE fixes + some missing shift->pop changes in enableCache implementation
comment:8 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
The patch does not display correctly in trac! I'll try to find what's going on, but if someone knows what went wrong please let me know.