pub struct PieChart {
pub values: Vec<f64>,
pub colors: Vec<Vec4>,
pub label: Option<String>,
pub slice_labels: Vec<String>,
pub label_format: Option<String>,
pub explode: Vec<bool>,
pub visible: bool,
/* private fields */
}Fields§
§values: Vec<f64>§colors: Vec<Vec4>§label: Option<String>§slice_labels: Vec<String>§label_format: Option<String>§explode: Vec<bool>§visible: boolImplementations§
Source§impl PieChart
impl PieChart
pub fn new(values: Vec<f64>, colors: Option<Vec<Vec4>>) -> Result<Self, String>
pub fn with_label<S: Into<String>>(self, s: S) -> Self
pub fn with_slice_labels(self, labels: Vec<String>) -> Self
pub fn set_slice_labels(&mut self, labels: Vec<String>)
pub fn with_label_format<S: Into<String>>(self, format: S) -> Self
pub fn with_explode(self, explode: Vec<bool>) -> Self
pub fn set_visible(&mut self, v: bool)
pub fn slice_labels(&self) -> Vec<String>
pub fn slice_meta(&self) -> Vec<PieSliceMeta>
pub fn generate_vertices(&mut self) -> (&Vec<Vertex>, &Vec<u32>)
pub fn bounds(&mut self) -> BoundingBox
pub fn render_data(&mut self) -> RenderData
pub fn estimated_memory_usage(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PieChart
impl RefUnwindSafe for PieChart
impl Send for PieChart
impl Sync for PieChart
impl Unpin for PieChart
impl UnsafeUnpin for PieChart
impl UnwindSafe for PieChart
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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