pub struct ImageRenderer { /* private fields */ }
Available on crate feature
ssr
only.Implementations§
Source§impl ImageRenderer
impl ImageRenderer
pub fn new(width: u32, height: u32) -> Self
pub fn theme(self, theme: Theme) -> Self
Sourcepub fn render(&mut self, chart: &Chart) -> Result<String, EchartsError>
pub fn render(&mut self, chart: &Chart) -> Result<String, EchartsError>
Render chart to an SVG String
Sourcepub fn render_format(
&mut self,
image_format: ImageFormat,
chart: &Chart,
) -> Result<Vec<u8>, EchartsError>
pub fn render_format( &mut self, image_format: ImageFormat, chart: &Chart, ) -> Result<Vec<u8>, EchartsError>
Render a chart to a given image format in bytes
Sourcepub fn save<P: AsRef<Path>>(
&mut self,
chart: &Chart,
path: P,
) -> Result<(), EchartsError>
pub fn save<P: AsRef<Path>>( &mut self, chart: &Chart, path: P, ) -> Result<(), EchartsError>
Render and save chart as an SVG
Sourcepub fn save_format<P: AsRef<Path>>(
&mut self,
image_format: ImageFormat,
chart: &Chart,
path: P,
) -> Result<(), EchartsError>
pub fn save_format<P: AsRef<Path>>( &mut self, image_format: ImageFormat, chart: &Chart, path: P, ) -> Result<(), EchartsError>
Render and save chart as the given image format
Auto Trait Implementations§
impl Freeze for ImageRenderer
impl !RefUnwindSafe for ImageRenderer
impl !Send for ImageRenderer
impl !Sync for ImageRenderer
impl Unpin for ImageRenderer
impl !UnwindSafe for ImageRenderer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more