A default formatter that displays values with reasonable precision.
(mark: Tick)
| 44 | /// |
| 45 | /// ## Arguments |
| 46 | /// - `min`: The minimum value of the axis in world coordinates. |
| 47 | /// - `max`: The maximum value of the axis in world coordinates. |
| 48 | /// - `width_pixels`: The width of the plot along this axis in pixels. |
| 49 | /// |
| 50 | /// ## Returns |
| 51 | /// A vector of `Tick` structs representing the positions and weights of ticks along the axis. |
| 52 | pub type TickProducer = Arc<dyn Fn(f64, f64, f64) -> Vec<Tick> + Send + Sync>; |
| 53 | |
| 54 | /// A default formatter that displays values with reasonable precision. |
| 55 | pub fn default_formatter(mark: Tick) -> String { |
| 56 | let log_step = mark.step_size.log10(); |
| 57 | if log_step >= 0.0 { |
nothing calls this directly
no outgoing calls
no test coverage detected