Fix #658: rename tick-label formatter styler methods to proper Java case#971
Merged
Merged
Conversation
- Add setXAxisTickLabelsFormattingFunction / setYAxisTickLabelsFormattingFunction (and matching getters) to AxesChartStyler with uppercase X/Y following Java conventions, so they are discoverable in IDEs alongside other setX/setY methods. - Deprecate old lowercase setxAxisTickLabelsFormattingFunction / setyAxisTickLabelsFormattingFunction; they now delegate to the new methods. - Update Axis_X and Axis_Y internal callers to use the new method names. - Remove erroneous @deprecated tag from AxesChart.setCustomXAxisTickLabelsFormatter and setCustomYAxisTickLabelsFormatter; add proper Javadoc to both. - Update all demo and test callsites to the new names. - Add TestForIssue658.java demo showing the map-to-label pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Issue #658 asks whether a custom tick-label API exists. It does — but users couldn't find it because
setxAxisTickLabelsFormattingFunctionstarts with a lowercasex, making it invisible in IDE autocompletion next to all the othersetX…/setY…styler methods.To make things worse, the nicer convenience methods
setCustomXAxisTickLabelsFormatter/setCustomYAxisTickLabelsFormatteronAxesChartwere marked@Deprecated, pushing users toward the hard-to-find styler methods.Changes
AxesChartStylersetXAxisTickLabelsFormattingFunction/getXAxisTickLabelsFormattingFunction(uppercase X — proper Java convention)setYAxisTickLabelsFormattingFunction/getYAxisTickLabelsFormattingFunction(uppercase Y)setxAxis…/setyAxis…variants; they now delegate to the new methods (no behaviour change)AxesChart@Deprecatedtag fromsetCustomXAxisTickLabelsFormatter/setCustomYAxisTickLabelsFormatterInternal callers
Axis_X,Axis_Yupdated to call the new getter namesDemos & tests
TestForIssue658.javaadded — shows the map-to-label pattern (build aMap<Double, String>and pass a lookup lambda as the formatter)Usage after this fix
Closes #658