Author: abearez Date: Wed Jan 29 06:38:22 2020 New Revision: 1873282 URL: http://svn.apache.org/viewvc?rev=1873282&view=rev Log: Invert bar chart if negative by Niklas Mollenhauer
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBar3DChartData.java poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBarChartData.java Modified: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBar3DChartData.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBar3DChartData.java?rev=1873282&r1=1873281&r2=1873282&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBar3DChartData.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBar3DChartData.java Wed Jan 29 06:38:22 2020 @@ -251,6 +251,27 @@ public class XDDFBar3DChartData extends } } + /** + * @since 4.1.2 + */ + public boolean getInvertIfNegative() { + if (series.isSetInvertIfNegative()) { + return series.getInvertIfNegative().getVal(); + } + return false; + } + + /** + * @since 4.1.2 + */ + public void setInvertIfNegative(boolean invertIfNegative) { + if (series.isSetInvertIfNegative()) { + series.getInvertIfNegative().setVal(invertIfNegative); + } else { + series.addNewInvertIfNegative().setVal(invertIfNegative); + } + } + @Override public void setShowLeaderLines(boolean showLeaderLines) { if (!series.isSetDLbls()) { Modified: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBarChartData.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBarChartData.java?rev=1873282&r1=1873281&r2=1873282&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBarChartData.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFBarChartData.java Wed Jan 29 06:38:22 2020 @@ -241,6 +241,27 @@ public class XDDFBarChartData extends XD } } + /** + * @since 4.1.2 + */ + public boolean getInvertIfNegative() { + if (series.isSetInvertIfNegative()) { + return series.getInvertIfNegative().getVal(); + } + return false; + } + + /** + * @since 4.1.2 + */ + public void setInvertIfNegative(boolean invertIfNegative) { + if (series.isSetInvertIfNegative()) { + series.getInvertIfNegative().setVal(invertIfNegative); + } else { + series.addNewInvertIfNegative().setVal(invertIfNegative); + } + } + @Override public void setShowLeaderLines(boolean showLeaderLines) { if (!series.isSetDLbls()) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org For additional commands, e-mail: commits-h...@poi.apache.org