pub struct HistogramSpec {
pub method: String,
pub bins: usize,
pub series: Vec<PlotSeriesSpec>,
}Expand description
Backend-neutral histogram request produced by hist() hooks.
Fields§
§method: String§bins: usize§series: Vec<PlotSeriesSpec>Implementations§
Source§impl HistogramSpec
impl HistogramSpec
Sourcepub fn to_svg(&self) -> Result<String, FrameError>
pub fn to_svg(&self) -> Result<String, FrameError>
Render a grouped histogram: one inset of bins bars per series, NaN
values skipped. Fails closed on non-numeric input or all-missing data.
Sourcepub fn to_svg_bytes(&self) -> Result<Vec<u8>, FrameError>
pub fn to_svg_bytes(&self) -> Result<Vec<u8>, FrameError>
HistogramSpec::to_svg as UTF-8 bytes.
Sourcepub fn to_html(&self) -> Result<String, FrameError>
pub fn to_html(&self) -> Result<String, FrameError>
Wrap the deterministic SVG in an HTML figure container.
Sourcepub fn to_html_page(&self, title: Option<&str>) -> Result<String, FrameError>
pub fn to_html_page(&self, title: Option<&str>) -> Result<String, FrameError>
Render this histogram spec to a complete HTML5 page document.
Sourcepub fn to_markdown(&self) -> Result<String, FrameError>
pub fn to_markdown(&self) -> Result<String, FrameError>
Render this histogram spec to Markdown-compatible HTML embedding.
Trait Implementations§
Source§impl Clone for HistogramSpec
impl Clone for HistogramSpec
Source§impl Debug for HistogramSpec
impl Debug for HistogramSpec
Source§impl<'de> Deserialize<'de> for HistogramSpec
impl<'de> Deserialize<'de> for HistogramSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HistogramSpec
impl PartialEq for HistogramSpec
Source§impl Serialize for HistogramSpec
impl Serialize for HistogramSpec
impl StructuralPartialEq for HistogramSpec
Auto Trait Implementations§
impl !RefUnwindSafe for HistogramSpec
impl !UnwindSafe for HistogramSpec
impl Freeze for HistogramSpec
impl Send for HistogramSpec
impl Sync for HistogramSpec
impl Unpin for HistogramSpec
impl UnsafeUnpin for HistogramSpec
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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