From 518750dd2ff5f6b870703ef6acf8c74d2e98a3cd Mon Sep 17 00:00:00 2001 From: xwartz Date: Sat, 10 Dec 2016 15:49:09 +0800 Subject: [PATCH] Add ability set labelCountForce --- .../react_native_mpchart/MPBarLineChartManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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");