Skip to content

Commit

Permalink
update example with new separated tickmarks mechanic
Browse files Browse the repository at this point in the history
  • Loading branch information
hageldave committed Sep 16, 2024
1 parent abcb483 commit 39a43ff
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ public static void oldWay() {
// set the content renderer of the coordinate system
coordsys.setContent(barRenderer);
// we need to change the tick marks labeling for the y axis
TickMarkGenerator oldTickGen = coordsys.getTickMarkGenerator();
coordsys.setTickMarkGenerator((min,max,desired,vert)->{
if(!vert){
return oldTickGen.genTicksAndLabels(min,max,desired,vert);
}
coordsys.setTickMarkGeneratorY((min,max,desired,vert)->{
// make ticks at integer values (0,1,2,...)
double[] ticks = IntStream.range(0, cases.length)
.mapToDouble(i -> (double)i)
Expand Down

0 comments on commit 39a43ff

Please sign in to comment.