diff --git a/android/src/main/java/cn/mandata/react_native_mpchart/MPBarLineChartManager.java b/android/src/main/java/cn/mandata/react_native_mpchart/MPBarLineChartManager.java index 769c73e..3c89ec1 100644 --- a/android/src/main/java/cn/mandata/react_native_mpchart/MPBarLineChartManager.java +++ b/android/src/main/java/cn/mandata/react_native_mpchart/MPBarLineChartManager.java @@ -241,7 +241,13 @@ private void setYAxisInfo(YAxis axis,ReadableMap v){ if(v.hasKey("spaceBottom")) axis.setSpaceBottom((float) (v.getDouble("spaceBottom"))); if(v.hasKey("showOnlyMinMax")) axis.setShowOnlyMinMax(v.getBoolean("showOnlyMinMax")); - if(v.hasKey("labelCount")) axis.setLabelCount(v.getInt("labelCount"), true); + if(v.hasKey("labelCount")) { + boolean labelCountForce = false; + if (v.hasKey("labelCountForce")) { + labelCountForce = v.getBoolean("labelCountForce"); + } + axis.setLabelCount(v.getInt("labelCount"), labelCountForce); + } if(v.hasKey("position")) { String name=v.getString("position");