Introduce a new StepMode - #32
Conversation
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
|
I really love this feature - thanks for contributing! One comment on the design: I suggest this because Thoughts? |
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
Stepmode2
|
Yeah, subclassing is a better idea (see merge). I am also thinking of making the |
|
Sounds good! |
halfhp
left a comment
There was a problem hiding this comment.
I made a couple minor comments that need to be addressed before merging but other than that, looks good.
Optional:
Would love to get a unit test or two for the new class, as well as an addition to the docs.
| <element module="All" copyright="AndroidPlot Apache 2.0" /> | ||
| </module2copyright> | ||
| </settings> | ||
| <settings default="" /> |
There was a problem hiding this comment.
This file needs to be reverted before I can merge in.
|
|
||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:2.2.0' | ||
| classpath 'com.android.tools.build:gradle:2.2.3' |
| } | ||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:1.2.3' | ||
| classpath 'com.android.tools.build:gradle:2.2.3' |
| * Depending on the currently displayed range (by value) choose increment so that | ||
| * the number of lines is closest to StepModel.value | ||
| */ | ||
|
|
There was a problem hiding this comment.
extra space should be removed. (not sure the javadoc generator will pick up the comment otherwise)
added unit test for StepModelFit
Stepmode2
|
Ok that should do it... |
Introduce a new StepMode (halfhp#32)
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
Also: Sorry about the changed gradle/profile settings disregard those