@@ -128,7 +128,7 @@ public enum YAxisLabelPosition {
128128 * This could happen if two adjacent axis values are rounded to same value.
129129 * If using granularity this could be avoided by having fewer axis values visible.
130130 */
131- protected boolean mGranularityEnabled = true ;
131+ protected boolean mGranularityEnabled = false ;
132132
133133 /**
134134 * the minimum interval between axis values
@@ -207,7 +207,7 @@ public boolean isGranularityEnabled() {
207207 /**
208208 * Enabled/disable granularity control on axis value intervals. If enabled, the axis
209209 * interval is not allowed to go below a certain granularity (which is either
210- * auto-calculated, or custom set)
210+ * auto-calculated, or custom set). Default: false
211211 *
212212 * @param enabled
213213 */
@@ -224,20 +224,21 @@ public float getGranularity() {
224224
225225 /**
226226 * Set a custom minimum interval between axis values (instead of auto-calculation). The axis
227- * interval can then not go below
228- * the specified limit. Use resetGranularity() to re- enable auto calculation .
227+ * interval can then not go below the specified limit. Use resetGranularity() to re-enable
228+ * auto calculation. This will automatically enable granularity .
229229 * This can be used to avoid label duplicating when zooming in.
230230 *
231231 * @param granularity
232232 */
233233 public void setGranularity (float granularity ) {
234234 mGranularity = granularity ;
235+ mGranularityEnabled = true ;
235236 mCustomGranularity = true ;
236237 }
237238
238239 /**
239240 * Reset the custom-set granularity. If this method is called, granularity
240- * is again auto calculated.
241+ * is again auto calculated (if enabled) .
241242 */
242243 public void resetGranularity () {
243244 mCustomGranularity = false ;
0 commit comments