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 3c89ec1..d1b2bd2 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 @@ -338,6 +338,7 @@ public void setLegend(BarLineChartBase chart,ReadableMap v){ if(v.hasKey("direction")) legend.setDirection(Legend.LegendDirection.valueOf(v.getString("direction"))); if(v.hasKey("legendForm")) legend.setForm(Legend.LegendForm.valueOf(v.getString("legendForm"))); + if(v.hasKey("wordWrap")) legend.setWordWrapEnabled(v.getBoolean("wordWrap")); if(v.hasKey("textColor")) legend.setTextColor(Color.parseColor(v.getString("textColor"))); if(v.hasKey("textSize")) legend.setTextSize((float) v.getDouble("textSize")); diff --git a/android/src/main/java/cn/mandata/react_native_mpchart/MPPieRadarChartManager.java b/android/src/main/java/cn/mandata/react_native_mpchart/MPPieRadarChartManager.java index 069e610..c75989d 100644 --- a/android/src/main/java/cn/mandata/react_native_mpchart/MPPieRadarChartManager.java +++ b/android/src/main/java/cn/mandata/react_native_mpchart/MPPieRadarChartManager.java @@ -92,6 +92,7 @@ public void setLegend(PieRadarChartBase chart,ReadableMap v){ if(v.hasKey("direction")) legend.setDirection(Legend.LegendDirection.valueOf(v.getString("direction"))); if(v.hasKey("legendForm")) legend.setForm(Legend.LegendForm.valueOf(v.getString("legendForm"))); + if(v.hasKey("wordWrap")) legend.setWordWrapEnabled(v.getBoolean("wordWrap")); if(v.hasKey("textColor")) legend.setTextColor(Color.parseColor(v.getString("textColor"))); if(v.hasKey("textSize")) legend.setTextSize((float) v.getDouble("textSize"));