From b6315eb950fd810132c3428666d2b6274e0f3e0a Mon Sep 17 00:00:00 2001 From: RainInFall Date: Fri, 3 Mar 2017 09:48:32 +0800 Subject: [PATCH 1/2] fix import react native package Work with 0.41.0 --- .../cn/mandata/react_native_mpchart/MPCombinedChartManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/cn/mandata/react_native_mpchart/MPCombinedChartManager.java b/android/src/main/java/cn/mandata/react_native_mpchart/MPCombinedChartManager.java index cfc5f86..1b9c142 100644 --- a/android/src/main/java/cn/mandata/react_native_mpchart/MPCombinedChartManager.java +++ b/android/src/main/java/cn/mandata/react_native_mpchart/MPCombinedChartManager.java @@ -7,7 +7,7 @@ import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.annotations.ReactProp; -import com.facebook.react.uimanager.ReactPropGroup; +import com.facebook.react.uimanager.annotations.ReactPropGroup; import com.facebook.react.uimanager.SimpleViewManager; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; From d6d287220cb80eeab0821591b07444958e4ae3f7 Mon Sep 17 00:00:00 2001 From: RainInFall Date: Fri, 10 Mar 2017 08:48:37 +0800 Subject: [PATCH 2/2] add drawCubic add drawCubic --- .../java/cn/mandata/react_native_mpchart/MPLineChartManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/cn/mandata/react_native_mpchart/MPLineChartManager.java b/android/src/main/java/cn/mandata/react_native_mpchart/MPLineChartManager.java index 115e0a7..b56525a 100644 --- a/android/src/main/java/cn/mandata/react_native_mpchart/MPLineChartManager.java +++ b/android/src/main/java/cn/mandata/react_native_mpchart/MPLineChartManager.java @@ -79,6 +79,7 @@ public void setData(LineChart chart,ReadableMap rm){ entries.add(be);*/ ReadableMap config= map.getMap("config"); LineDataSet dataSet=new LineDataSet(entries,label); + if(config.hasKey("drawCubic")) dataSet.setDrawCubic(config.getBoolean("drawCubic")); if(config.hasKey("drawCircles")) dataSet.setDrawCircles(config.getBoolean("drawCircles")); if(config.hasKey("circleSize")) dataSet.setCircleSize((float) config.getDouble("circleSize")); if(config.hasKey("lineWidth")) dataSet.setLineWidth((float) config.getDouble("lineWidth"));