File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -636,14 +636,14 @@ impl CustomAxesDemo {
636636 }
637637 } ;
638638
639- let label_fmt = |_s : & str , val : & PlotPoint | {
640- format ! (
639+ let label_fmt = |_nearest : Option < ( & str , usize ) > , val : & PlotPoint | {
640+ Some ( format ! (
641641 "Day {d}, {h}:{m:02}\n {p:.2}%" ,
642642 d = day( val. x) ,
643643 h = hour( val. x) ,
644644 m = minute( val. x) ,
645645 p = percent( val. y)
646- )
646+ ) )
647647 } ;
648648
649649 ui. label ( "Zoom in on the X-axis to see hours and minutes" ) ;
@@ -669,7 +669,7 @@ impl CustomAxesDemo {
669669 . custom_x_axes ( x_axes)
670670 . custom_y_axes ( y_axes)
671671 . x_grid_spacer ( Self :: x_grid)
672- . label_formatter ( label_fmt)
672+ . enumerated_label_formatter ( label_fmt)
673673 . show ( ui, |plot_ui| {
674674 plot_ui. line ( Self :: logistic_fn ( ) ) ;
675675 } )
You can’t perform that action at this time.
0 commit comments