diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2022-01-10 22:06:26 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2022-01-10 22:06:26 +0000 |
commit | ff6984df00f3376a29aeb89da7b04dde3f5ee1a3 (patch) | |
tree | bd1c59af48164761229b91c4cb16f9aeab2c7936 /poi-examples/src/main/java | |
parent | 78f7decf00a5a3b8f075222464879aa6d8b9ce48 (diff) | |
download | poi-ff6984df00f3376a29aeb89da7b04dde3f5ee1a3.tar.gz poi-ff6984df00f3376a29aeb89da7b04dde3f5ee1a3.zip |
remove and prevent links to stackoverflow
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896899 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples/src/main/java')
7 files changed, 14 insertions, 25 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xslf/BarChartDemo.java b/poi-examples/src/main/java/org/apache/poi/examples/xslf/BarChartDemo.java index 3a54f75ced..5ddcd19d4a 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xslf/BarChartDemo.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xslf/BarChartDemo.java @@ -124,7 +124,7 @@ public final class BarChartDemo { series2.setTitle(series[1], chart.setSheetTitle(series[1], COLUMN_SPEAKERS)); chart.plot(bar); - chart.setTitleText(chartTitle); // https://stackoverflow.com/questions/30532612 + chart.setTitleText(chartTitle); // chart.setTitleOverlay(overlay); // adjust font size for readability diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java index 32329f2c29..b49871c32a 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java @@ -58,10 +58,6 @@ import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; -// original contributions by Axel Richter on https://stackoverflow.com/questions/47065690 -// additional title formatting from https://stackoverflow.com/questions/50418856 -// and legend positioning from https://stackoverflow.com/questions/49615379 -// this would probably be an answer for https://stackoverflow.com/questions/36447925 too public final class BarAndLineChart { private static final int NUM_OF_ROWS = 7; diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java index 8c68fe87a7..7f1f1c5ec6 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java @@ -79,7 +79,7 @@ public final class BarChart { // Use a category axis for the bottom axis. XDDFCategoryAxis bottomAxis = chart.createCategoryAxis(AxisPosition.BOTTOM); - bottomAxis.setTitle("x"); // https://stackoverflow.com/questions/32010765 + bottomAxis.setTitle("x"); XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT); leftAxis.setTitle("f(x)"); leftAxis.setCrosses(AxisCrosses.AUTO_ZERO); @@ -90,7 +90,7 @@ public final class BarChart { XDDFChartData data = chart.createData(ChartTypes.BAR, bottomAxis, leftAxis); XDDFChartData.Series series1 = data.addSeries(xs, ys1); - series1.setTitle("2x", null); // https://stackoverflow.com/questions/21855842 + series1.setTitle("2x", null); XDDFChartData.Series series2 = data.addSeries(xs, ys2); series2.setTitle("3x", null); chart.plot(data); diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java index a80916148a..83b8653297 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java @@ -53,14 +53,10 @@ import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; /** - * This example is based on original contributions by Axel Richter on StackOverflow. + * This example is based on original contributions by Axel Richter * * <em>Note from original author</em>: * This only works for Excel since OpenOffice or LibreOffice Calc is not able having series having literal numeric values set. - * - * @see <a href="https://stackoverflow.com/questions/50772989/">Create target marker in a bar chart with openxmlformats</a> - * @see <a href="https://stackoverflow.com/questions/50873700/">Change axis color and font of the chart in openxmlformats</a> - * @see <a href="https://stackoverflow.com/questions/51530552/">Change colors of line chart Apache POI</a> */ public final class ExcelChartWithTargetLine { private ExcelChartWithTargetLine() {} @@ -91,7 +87,6 @@ public final class ExcelChartWithTargetLine { leftValues.crossAxis(barCategories); barCategories.crossAxis(leftValues); - // from https://stackoverflow.com/questions/50873700/ // colored major grid lines leftValues.getOrAddMajorGridProperties().setLineProperties(solidTomato); //colored axis line @@ -167,7 +162,6 @@ public final class ExcelChartWithTargetLine { } - // from https://stackoverflow.com/questions/51530552/ // customize the chart // do not auto delete the title diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java index 724d3e2608..d0cf568e6a 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java @@ -78,7 +78,7 @@ public final class LineChart { // Use a category axis for the bottom axis. XDDFCategoryAxis bottomAxis = chart.createCategoryAxis(AxisPosition.BOTTOM); - bottomAxis.setTitle("x"); // https://stackoverflow.com/questions/32010765 + bottomAxis.setTitle("x"); XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT); leftAxis.setTitle("f(x)"); leftAxis.setCrosses(AxisCrosses.AUTO_ZERO); @@ -89,20 +89,19 @@ public final class LineChart { XDDFLineChartData data = (XDDFLineChartData) chart.createData(ChartTypes.LINE, bottomAxis, leftAxis); XDDFLineChartData.Series series1 = (XDDFLineChartData.Series) data.addSeries(xs, ys1); - series1.setTitle("2x", null); // https://stackoverflow.com/questions/21855842 - series1.setSmooth(false); // https://stackoverflow.com/questions/29014848 - series1.setMarkerStyle(MarkerStyle.STAR); // https://stackoverflow.com/questions/39636138 + series1.setTitle("2x", null); + series1.setSmooth(false); + series1.setMarkerStyle(MarkerStyle.STAR); XDDFLineChartData.Series series2 = (XDDFLineChartData.Series) data.addSeries(xs, ys2); series2.setTitle("3x", null); series2.setSmooth(true); series2.setMarkerSize((short) 6); - series2.setMarkerStyle(MarkerStyle.TRIANGLE); // https://stackoverflow.com/questions/39636138 + series2.setMarkerStyle(MarkerStyle.TRIANGLE); chart.plot(data); - // if your series have missing values like https://stackoverflow.com/questions/29014848 + // if your series have missing values // chart.displayBlanksAs(DisplayBlanks.GAP); - // https://stackoverflow.com/questions/24676460 solidLineSeries(data, 0, PresetColor.CHARTREUSE); solidLineSeries(data, 1, PresetColor.TURQUOISE); diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java index a5ce3c84ae..c74de7f840 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java @@ -78,7 +78,7 @@ public final class ScatterChart { legend.setPosition(LegendPosition.TOP_RIGHT); XDDFValueAxis bottomAxis = chart.createValueAxis(AxisPosition.BOTTOM); - bottomAxis.setTitle("x"); // https://stackoverflow.com/questions/32010765 + bottomAxis.setTitle("x"); XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT); leftAxis.setTitle("f(x)"); leftAxis.setCrosses(AxisCrosses.AUTO_ZERO); @@ -90,8 +90,8 @@ public final class ScatterChart { XDDFScatterChartData data = (XDDFScatterChartData) chart.createData(ChartTypes.SCATTER, bottomAxis, leftAxis); XDDFScatterChartData.Series series1 = (XDDFScatterChartData.Series) data.addSeries(xs, ys1); - series1.setTitle("2x", null); // https://stackoverflow.com/questions/21855842 - series1.setSmooth(false); // https://stackoverflow.com/questions/39636138 + series1.setTitle("2x", null); + series1.setSmooth(false); XDDFScatterChartData.Series series2 = (XDDFScatterChartData.Series) data.addSeries(xs, ys2); series2.setTitle("3x", null); chart.plot(data); diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java b/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java index df79c5199b..d96aaeef61 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java @@ -123,7 +123,7 @@ public final class BarChartExample { series2.setTitle(series[1], chart.setSheetTitle(series[1], 1)); chart.plot(bar); - chart.setTitleText(chartTitle); // https://stackoverflow.com/questions/30532612 + chart.setTitleText(chartTitle); chart.setTitleOverlay(false); } |