pub struct ChartContext {
pub canvas: BrailleCanvas,
}Fields§
§canvas: BrailleCanvasImplementations§
Source§impl ChartContext
impl ChartContext
pub fn new(width: usize, height: usize) -> Self
pub fn get_auto_range( points: &[(f64, f64)], padding: f64, ) -> ((f64, f64), (f64, f64))
pub fn scatter(&mut self, points: &[(f64, f64)], color: Option<Color>)
pub fn line_chart(&mut self, points: &[(f64, f64)], color: Option<Color>)
pub fn bar_chart(&mut self, values: &[(f64, Option<Color>)])
pub fn polygon(&mut self, vertices: &[(f64, f64)], color: Option<Color>)
pub fn pie_chart(&mut self, slices: &[(f64, Option<Color>)])
pub fn draw_circle( &mut self, center: (f64, f64), radius_norm: f64, color: Option<Color>, )
pub fn plot_function<F>( &mut self, func: F, min_x: f64, max_x: f64, color: Option<Color>, )
pub fn text( &mut self, text: &str, x_norm: f64, y_norm: f64, color: Option<Color>, )
Sourcepub fn draw_axes(
&mut self,
x_range: (f64, f64),
y_range: (f64, f64),
color: Option<Color>,
)
pub fn draw_axes( &mut self, x_range: (f64, f64), y_range: (f64, f64), color: Option<Color>, )
Dibuja los ejes calculando “ticks” intermedios de forma automática.
pub fn draw_grid(&mut self, divs_x: usize, divs_y: usize, color: Option<Color>)
Auto Trait Implementations§
impl Freeze for ChartContext
impl RefUnwindSafe for ChartContext
impl Send for ChartContext
impl Sync for ChartContext
impl Unpin for ChartContext
impl UnsafeUnpin for ChartContext
impl UnwindSafe for ChartContext
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