From 332fc4d81c165f2f51ce6282736d0753203e3143 Mon Sep 17 00:00:00 2001 From: "varun.sureshs" Date: Mon, 30 Sep 2024 16:55:29 +0530 Subject: [PATCH 1/2] Feat: Adding setter for symbols in SymbolAxis --- src/main/java/org/jfree/chart/axis/SymbolAxis.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/org/jfree/chart/axis/SymbolAxis.java b/src/main/java/org/jfree/chart/axis/SymbolAxis.java index 9aad9ab420..50c101acb0 100644 --- a/src/main/java/org/jfree/chart/axis/SymbolAxis.java +++ b/src/main/java/org/jfree/chart/axis/SymbolAxis.java @@ -125,6 +125,15 @@ public String[] getSymbols() { return result; } + /** + * Returns an array of the symbols for the axis. + * + * @return The symbols. + */ + public void setSymbols(String[] symbols) { + this.symbols = Arrays.asList(symbols); + } + /** * Returns the flag that controls whether or not grid bands are drawn for * the axis. The default value is {@code true}. From 19e59d8dad31c1b67bfd50d19a5018100c7908ae Mon Sep 17 00:00:00 2001 From: S-Varunn <85671418+S-Varunn@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:55:12 +0530 Subject: [PATCH 2/2] Update: JavaDoc revision and fire event change. --- src/main/java/org/jfree/chart/axis/SymbolAxis.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jfree/chart/axis/SymbolAxis.java b/src/main/java/org/jfree/chart/axis/SymbolAxis.java index 50c101acb0..f0e5933033 100644 --- a/src/main/java/org/jfree/chart/axis/SymbolAxis.java +++ b/src/main/java/org/jfree/chart/axis/SymbolAxis.java @@ -126,12 +126,13 @@ public String[] getSymbols() { } /** - * Returns an array of the symbols for the axis. + * Sets the list of symbols to display instead of the numeric values. * - * @return The symbols. + * @param symbols List of symbols. */ public void setSymbols(String[] symbols) { this.symbols = Arrays.asList(symbols); + fireChangeEvent(); } /**