Skip to content

Conversation

@bennysj
Copy link

@bennysj bennysj commented Oct 24, 2025

The function borrow_secondary function does not return a mutable reference. It would be useful if it actually would be possible to get a &mut reference to the secondary context.
Implement a new function that actually return a &mut reference to the secondary context.

For example to write a generic draw function:

    fn draw_chart_series<DB>(
        chart: &mut ChartContext<'_, DB, Cartesian2d<RangedCoordf32, RangedCoordf32>>,
        data_series: &ModelRc<XYData>,
    ) where
        DB: DrawingBackend,
    {
        // draw the chart series for both primary and secondary
   }

The function borrow_secondary function does not return a mutable
reference. It would be useful if it actually would be possible
to get a &mut reference to the secondary context.
Implement a new function that actually return a &mut reference
to the secondary context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant