aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorGreg Woolsey <gwoolsey@apache.org>2017-06-12 05:38:41 +0000
committerGreg Woolsey <gwoolsey@apache.org>2017-06-12 05:38:41 +0000
commitaca91b788823c3e14bc355eb0e9068c6018a7112 (patch)
tree922fa6374a83455ab2e41fc8c2027306863f4f9c /src/java
parent7e79cadbdc5a10202ed7416bb7a09ae17bec6e08 (diff)
downloadpoi-aca91b788823c3e14bc355eb0e9068c6018a7112.tar.gz
poi-aca91b788823c3e14bc355eb0e9068c6018a7112.zip
Standardize some more common chart axis properties.
Implement the ChartAxis ss interface for date axes, which are pretty much a category axis with one extra property, a date granularity (not currently passed through, get it still from the CT* class). Created the class and test from the category axis versions. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798414 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/poi/ss/usermodel/charts/ChartAxis.java6
-rw-r--r--src/java/org/apache/poi/ss/usermodel/charts/ChartAxisFactory.java12
2 files changed, 16 insertions, 2 deletions
diff --git a/src/java/org/apache/poi/ss/usermodel/charts/ChartAxis.java b/src/java/org/apache/poi/ss/usermodel/charts/ChartAxis.java
index f3d9365894..45cec602f1 100644
--- a/src/java/org/apache/poi/ss/usermodel/charts/ChartAxis.java
+++ b/src/java/org/apache/poi/ss/usermodel/charts/ChartAxis.java
@@ -153,4 +153,10 @@ public interface ChartAxis {
* @param tickMark minor tick mark type.
*/
void setMinorTickMark(AxisTickMark tickMark);
+
+ /**
+ * Use this to check before retrieving a number format, as calling {@link #getNumberFormat()} may create a default one if none exists.
+ * @return true if a number format element is defined, false if not
+ */
+ boolean hasNumberFormat();
}
diff --git a/src/java/org/apache/poi/ss/usermodel/charts/ChartAxisFactory.java b/src/java/org/apache/poi/ss/usermodel/charts/ChartAxisFactory.java
index 87eff04cf5..3eb80e28b5 100644
--- a/src/java/org/apache/poi/ss/usermodel/charts/ChartAxisFactory.java
+++ b/src/java/org/apache/poi/ss/usermodel/charts/ChartAxisFactory.java
@@ -29,13 +29,21 @@ import org.apache.poi.util.Beta;
public interface ChartAxisFactory {
/**
- * @return new value axis
+ * @param pos
+ * @return new value axis at the end of the list at the specified chart position
*/
ValueAxis createValueAxis(AxisPosition pos);
/**
- * @return new category axis.
+ * @param pos
+ * @return new category axis at the end of the list at the specified chart position
*/
ChartAxis createCategoryAxis(AxisPosition pos);
+
+ /**
+ * @param pos
+ * @return new date category axis at the end of the list at the specified chart position
+ */
+ ChartAxis createDateAxis(AxisPosition pos);
}