Resolve an axis's value-label color, defaulting to black when unset. Centralizes the `axis.as_ref().and_then(|a| a.value_color.as_ref()).map(convert_rgb).unwrap_or(BLACK)` chain that otherwise repeats across every renderer.
(axis: Option<&Axis>)
| 13 | /// Centralizes the `axis.as_ref().and_then(|a| a.value_color.as_ref()).map(convert_rgb).unwrap_or(BLACK)` |
| 14 | /// chain that otherwise repeats across every renderer. |
| 15 | pub(super) fn axis_value_color(axis: Option<&Axis>) -> RGBColor { |
| 16 | axis.and_then(|a| a.value_color.as_ref()) |
| 17 | .map(convert_rgb) |
| 18 | .unwrap_or(BLACK) |
| 19 | } |
| 20 | |
| 21 | pub(super) fn configure_label_areas( |
| 22 | builder: &mut ChartBuilder<'_, '_, impl DrawingBackend>, |
no outgoing calls
no test coverage detected