Commit edf5ffe
PanZoom enhanced (halfhp#33)
* Introduce a new StepMode
Why:
Increment by value -> no good when zooming
Increment by pixel -> no good when zooming
subdivide -> depending on data chooses ticks at wired locations e.g (1.3 , 2.3, 3,3 instead of 1, 2, 3)
Workaround:
When you know your data: supply an array of predefined increments (by value) for StepModel to choose from
to best fit the desired number of lines. For example:
Start zoomed out with ticks every 100 and as you zoom in switch to 50,10,1
* Introduce a new StepMode
Why:
Increment by value -> no good when zooming
Increment by pixel -> no good when zooming
subdivide -> depending on data chooses ticks at wired locations e.g (1.3 , 2.3, 3,3 instead of 1, 2, 3)
Workaround:
When you know your data: supply an array of predefined increments (by value) for StepModel to choose from
to best fit the desired number of lines. For example:
Start zoomed out with ticks every 100 and as you zoom in switch to 50,10,1
* comments
* Extended PanZoom
New enum ZoomLimit to indicate in what way the zoom should be limited
Checks:
- Outer: do not zoom out beyond defined bounds
- Min Space: if StepMode defines a increment by value do not zoom in beyond one visible grid line
- None,Both....
* restore messed up build files
* restore messed up build files
* sanity check for StepModelFit.setSteps
added unit test for StepModelFit
* added test
snap to minimum
* getRangeStepMode() check removed
* javadoc1 parent bae8096 commit edf5ffe
3 files changed
Lines changed: 132 additions & 6 deletions
File tree
- androidplot-core/src
- main/java/com/androidplot/xy
- test/java/com/androidplot/xy
- demoapp/src/main/java/com/androidplot/demos
Lines changed: 76 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
80 | 98 | | |
81 | 99 | | |
82 | 100 | | |
83 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
84 | 111 | | |
85 | 112 | | |
86 | 113 | | |
87 | 114 | | |
88 | 115 | | |
89 | | - | |
| 116 | + | |
90 | 117 | | |
91 | 118 | | |
92 | 119 | | |
93 | 120 | | |
94 | 121 | | |
95 | 122 | | |
96 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
97 | 133 | | |
98 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
99 | 147 | | |
100 | 148 | | |
101 | 149 | | |
| |||
332 | 380 | | |
333 | 381 | | |
334 | 382 | | |
335 | | - | |
| 383 | + | |
| 384 | + | |
336 | 385 | | |
337 | 386 | | |
338 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
339 | 395 | | |
340 | 396 | | |
341 | 397 | | |
| |||
347 | 403 | | |
348 | 404 | | |
349 | 405 | | |
350 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
351 | 414 | | |
352 | 415 | | |
353 | 416 | | |
| |||
377 | 440 | | |
378 | 441 | | |
379 | 442 | | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
380 | 451 | | |
381 | 452 | | |
382 | 453 | | |
| |||
Lines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
181 | 236 | | |
182 | 237 | | |
183 | 238 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
0 commit comments