JavaFX XYChart NumberAxis -


i'm having problems y axis on custom xychart. y axis numberaxis, , set tick label formatter custom formatter. auto-ranging off. when change upper bound of chart , request axis layout, old labels remain on chart. debug logging, can see custom formatter methods being invoked, , return correct strings, tick labels on chart not update. ones update ones not on axis before. example, if range of y axis 0 3, , change upper bound 3 5, new labels correct values show @ indices 4 , 5. however, labels 0 through 3 not update though custom formatter returns different strings them.

i tried taking custom formatter out of equation , changed tick label fill color when changed upper bound of y axis, , saw same behavior (labels pre-existing indices had old color, , labels new indices had new color). hope i'm missing obvious. appreciated. otherwise may need resort recreating chart whenever y axis labels need change.

from have found, tick labels immutable. once range set, adds , removes ticks, doesn't update them. did overcome set upper bound lower bound (effectively removing ticks), , setting upper bound range wanted, re-create ticks.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -