You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think x.intValue() is the issue. If I simply use x -> String.valueOf(x.intValue()) as my formatting function, the x-axis tick labels seem fine (no rounding off issues):
I have the following chart and I want to hide every 2 tick labels on the x-axis.
The expected output should be:
I used the
setxAxisTickLabelsFormattingFunction
method as follows:The resulting incorrect chart is:
If I change the formatting function to
x -> x.intValue() % 2 == 0 ? String.valueOf(x) : "skip"
, the resulting chart becomes:It seems that there are only 2 unique values of
x
that are passed to the formatting function instead of 8.How can I achieve my desired output? Thanks.
Note: I am using
xchart-3.8.5.jar
.The text was updated successfully, but these errors were encountered: