pub struct ChartRenderer {
pub margin: f64,
pub grid_opacity: f64,
pub coordinate_system: CoordinateSystem,
}Expand description
Renderer for various chart types
Fields§
§margin: f64Default margin around charts
grid_opacity: f64Default grid line opacity
coordinate_system: CoordinateSystemCoordinate system to use for rendering
Implementations§
Source§impl ChartRenderer
impl ChartRenderer
Sourcepub fn with_coordinate_system(coordinate_system: CoordinateSystem) -> Self
pub fn with_coordinate_system(coordinate_system: CoordinateSystem) -> Self
Create a new chart renderer with specific coordinate system
Sourcepub fn render_chart(
&self,
page: &mut Page,
chart: &Chart,
x: f64,
y: f64,
width: f64,
height: f64,
) -> Result<(), PdfError>
pub fn render_chart( &self, page: &mut Page, chart: &Chart, x: f64, y: f64, width: f64, height: f64, ) -> Result<(), PdfError>
Render a generic chart
Sourcepub fn render_bar_chart(
&self,
page: &mut Page,
chart: &BarChart,
x: f64,
y: f64,
width: f64,
height: f64,
) -> Result<(), PdfError>
pub fn render_bar_chart( &self, page: &mut Page, chart: &BarChart, x: f64, y: f64, width: f64, height: f64, ) -> Result<(), PdfError>
Render a bar chart
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChartRenderer
impl RefUnwindSafe for ChartRenderer
impl Send for ChartRenderer
impl Sync for ChartRenderer
impl Unpin for ChartRenderer
impl UnsafeUnpin for ChartRenderer
impl UnwindSafe for ChartRenderer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more