Commit 3d104ef
committed
[FIX] charts: small zoom is disabled
Task Description:
This task aims to reduce issue coming from the zoom feature in two
cases :
1. Make the slider looks "disabled" when there is only one data point
2. Don't zoom when the new min and max value are equals
3. The onMouseUp event is now resetting the displayed boundaries
according to the chart boundaries, to stay consistant.
Among all the changes, a new behavior has been added for the
onMouseUp in the master chart, where the lowerBound and the
upperBound are updated according to the real displayed boundaries
of the detail chart computed by chartJs. This avoid having lots of
different cases to recompute the boundaries one last time according
to the type of chart and axis.
Unfortunately, two tests are now unusable (checking the rounding of
the boundaries when mouseUping) as chartJs is not fully used/mocked
in the test, and then the boundaries are not correctly recomputed.
Related task
Task: 5058567
X-original-commit: 29160891 parent cd2982c commit 3d104ef
File tree
11 files changed
+307
-213
lines changed- packages/o-spreadsheet-engine/src/types/chart
- src/components
- figures/chart/chartJs/zoomable_chart
- side_panel/chart
- bar_chart
- tests
- figures/chart
- zoomable_charts
- test_helpers
11 files changed
+307
-213
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 23 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | | - | |
| 17 | + | |
13 | 18 | | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 62 | + | |
60 | 63 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
74 | 71 | | |
75 | 72 | | |
76 | 73 | | |
77 | 74 | | |
78 | 75 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 76 | + | |
84 | 77 | | |
85 | 78 | | |
86 | 79 | | |
| |||
97 | 90 | | |
98 | 91 | | |
99 | 92 | | |
100 | | - | |
| 93 | + | |
101 | 94 | | |
102 | 95 | | |
103 | 96 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | 97 | | |
108 | 98 | | |
109 | 99 | | |
110 | 100 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 101 | | |
121 | 102 | | |
122 | | - | |
| 103 | + | |
123 | 104 | | |
124 | | - | |
| 105 | + | |
125 | 106 | | |
126 | 107 | | |
127 | | - | |
128 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
129 | 112 | | |
130 | 113 | | |
131 | 114 | | |
| |||
0 commit comments