pub struct ChartComponent { /* private fields */ }Expand description
Chart rendering component with comprehensive chart type support
Implementations§
Source§impl ChartComponent
impl ChartComponent
Sourcepub fn with_config(id: String, config: ChartConfig) -> Self
pub fn with_config(id: String, config: ChartConfig) -> Self
Create a ChartComponent with custom configuration
Sourcepub fn with_data_and_config(
id: String,
data: Vec<DataPoint>,
config: ChartConfig,
) -> Self
pub fn with_data_and_config( id: String, data: Vec<DataPoint>, config: ChartConfig, ) -> Self
Create a ChartComponent with data and configuration
Sourcepub fn set_config(&mut self, config: ChartConfig)
pub fn set_config(&mut self, config: ChartConfig)
Set chart configuration
Sourcepub fn get_config(&self) -> &ChartConfig
pub fn get_config(&self) -> &ChartConfig
Get chart configuration reference
Sourcepub fn parse_data_from_content(&mut self, content: &str)
pub fn parse_data_from_content(&mut self, content: &str)
Parse chart data from text content
Sourcepub fn generate_with_muxbox_title(&self, muxbox_title: Option<&str>) -> String
pub fn generate_with_muxbox_title(&self, muxbox_title: Option<&str>) -> String
Generate chart content with muxbox title context to avoid duplication
Sourcepub fn render(&self, bounds: &Bounds, buffer: &mut ScreenBuffer)
pub fn render(&self, bounds: &Bounds, buffer: &mut ScreenBuffer)
Render chart directly to screen buffer at specified bounds
Sourcepub fn render_with_colors(
&self,
bounds: &Bounds,
fg_color: &str,
bg_color: &str,
buffer: &mut ScreenBuffer,
)
pub fn render_with_colors( &self, bounds: &Bounds, fg_color: &str, bg_color: &str, buffer: &mut ScreenBuffer, )
Render chart with custom colors
Sourcepub fn parse_chart_data(content: &str) -> Vec<DataPoint>
pub fn parse_chart_data(content: &str) -> Vec<DataPoint>
Parse chart data from text content (static version for external use)
Trait Implementations§
Source§impl Clone for ChartComponent
impl Clone for ChartComponent
Source§fn clone(&self) -> ChartComponent
fn clone(&self) -> ChartComponent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChartComponent
impl RefUnwindSafe for ChartComponent
impl Send for ChartComponent
impl Sync for ChartComponent
impl Unpin for ChartComponent
impl UnsafeUnpin for ChartComponent
impl UnwindSafe for ChartComponent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.