You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Convert a chart context into a chart state, by doing so, the chart context is consumed and
115
-
/// a saved chart state is created for later use.
135
+
/// a saved chart state is created for later use. This is typically used in incrmental rendering. See documentation of `ChartState` for more detailed example.
116
136
pubfninto_chart_state(self) -> ChartState<CT>{
117
137
self.into()
118
138
}
@@ -201,7 +221,7 @@ impl<
201
221
}
202
222
203
223
/// Initialize a mesh configuration object and mesh drawing can be finalized by calling
Copy file name to clipboardExpand all lines: src/chart/dual_coord.rs
+14-6Lines changed: 14 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -15,14 +15,22 @@ use crate::element::{Drawable, PointCollection};
15
15
16
16
use plotters_backend::{BackendCoord,DrawingBackend};
17
17
18
-
/// The chart context that has two coordinate system attached
18
+
/// The chart context that has two coordinate system attached.
19
+
/// This situation is quite common, for example, we with two different coodinate system.
20
+
/// For instance this example <img src="https://plotters-rs.github.io/plotters-doc-data/twoscale.png"></img>
21
+
/// This is done by attaching a second coordinate system to ChartContext by method [ChartContext::set_secondary_coord](struct.ChartContext.html#method.set_secondary_coord).
22
+
/// For instance of dual coordinate charts, see [this example](https://github.com/38/plotters/blob/master/examples/two-scales.rs#L15).
23
+
/// Note: `DualCoordChartContext` is always deref to the chart context.
24
+
/// - If you want to configure the secondary axis, method [DualCoordChartContext::configure_secondary_axes](struct.DualCoordChartContext.html#method.configure_secondary_axes)
25
+
/// - If you want to draw a series using secondary coordinate system, use [DualCoordChartContext::draw_secondary_series](struct.DualCoordChartContext.html#method.draw_secondary_series). And method [ChartContext::draw_series](struct.ChartContext.html#method.draw_series) will always use primary coordinate spec.
/// The trait for types that can decorated by `CentricDiscreteRange` decorator
101
+
/// The trait for types that can decorated by `CentricDiscreteRange` decorator. See [struct CentricDiscreteRange](struct.CentricDiscreteRange.html) for details.
0 commit comments