Author: fanningpj
Date: Wed Nov 8 11:14:47 2023
New Revision: 1913671
URL: http://svn.apache.org/viewvc?rev=1913671&view=rev
Log:
temp workaround for chart axis issue
Modified:
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xslf/ChartFromScratch.java
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java
Modified:
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xslf/ChartFromScratch.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xslf/ChartFromScratch.java?rev=1913671&r1=1913670&r2=1913671&view=diff
==============================================================================
---
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xslf/ChartFromScratch.java
(original)
+++
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xslf/ChartFromScratch.java
Wed Nov 8 11:14:47 2023
@@ -180,6 +180,10 @@ public final class ChartFromScratch {
chart.setTitleText(chartTitle);
chart.setTitleOverlay(false);
chart.setAutoTitleDeleted(false);
+
+ // temporary workaround for
https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
+ if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
+ if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
}
private static final int COLUMN_LANGUAGES = 0;
Modified:
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java?rev=1913671&r1=1913670&r2=1913671&view=diff
==============================================================================
---
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java
(original)
+++
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java
Wed Nov 8 11:14:47 2023
@@ -104,6 +104,10 @@ public final class BarChart {
solidFillSeries(data, 0, PresetColor.CHARTREUSE);
solidFillSeries(data, 1, PresetColor.TURQUOISE);
+ // temporary workaround for
https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
+ if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
+ if (leftAxis.hasNumberFormat())
leftAxis.setNumberFormat("#,##0.00");
+
// Write the output to a file
try (FileOutputStream fileOut = new
FileOutputStream("ooxml-bar-chart.xlsx")) {
wb.write(fileOut);
Modified:
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java?rev=1913671&r1=1913670&r2=1913671&view=diff
==============================================================================
---
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java
(original)
+++
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java
Wed Nov 8 11:14:47 2023
@@ -105,6 +105,10 @@ public final class LineChart {
solidLineSeries(data, 0, PresetColor.CHARTREUSE);
solidLineSeries(data, 1, PresetColor.TURQUOISE);
+ // temporary workaround for
https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
+ if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
+ if (leftAxis.hasNumberFormat())
leftAxis.setNumberFormat("#,##0.00");
+
// Write the output to a file
try (FileOutputStream fileOut = new
FileOutputStream("ooxml-line-chart.xlsx")) {
wb.write(fileOut);
Modified:
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java?rev=1913671&r1=1913670&r2=1913671&view=diff
==============================================================================
---
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java
(original)
+++
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java
Wed Nov 8 11:14:47 2023
@@ -99,6 +99,10 @@ public final class ScatterChart {
solidLineSeries(data, 0, PresetColor.CHARTREUSE);
solidLineSeries(data, 1, PresetColor.TURQUOISE);
+ // temporary workaround for
https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
+ if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
+ if (leftAxis.hasNumberFormat())
leftAxis.setNumberFormat("#,##0.00");
+
// Write the output to a file
try (FileOutputStream fileOut = new
FileOutputStream("ooxml-scatter-chart.xlsx")) {
wb.write(fileOut);
Modified:
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java?rev=1913671&r1=1913670&r2=1913671&view=diff
==============================================================================
---
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java
(original)
+++
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/ChartFromScratch.java
Wed Nov 8 11:14:47 2023
@@ -146,6 +146,10 @@ public final class ChartFromScratch {
chart.setTitleText(chartTitle);
chart.setTitleOverlay(false);
chart.setAutoTitleDeleted(false);
+
+ // temporary workaround for
https://bz.apache.org/bugzilla/show_bug.cgi?id=67510
+ if (bottomAxis.hasNumberFormat()) bottomAxis.setNumberFormat("@");
+ if (leftAxis.hasNumberFormat()) leftAxis.setNumberFormat("#,##0.00");
}
private static final int COLUMN_LANGUAGES = 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]