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))
Sourcepub fn scatter(&mut self, points: &[(f64, f64)], color: Option<Color>)
pub fn scatter(&mut self, points: &[(f64, f64)], color: Option<Color>)
Nube de puntos con color opcional
Sourcepub fn bar_chart(&mut self, values: &[(f64, Option<Color>)])
pub fn bar_chart(&mut self, values: &[(f64, Option<Color>)])
Gráfico de barras con colores por barra opcionales
Sourcepub fn polygon(&mut self, vertices: &[(f64, f64)], color: Option<Color>)
pub fn polygon(&mut self, vertices: &[(f64, f64)], color: Option<Color>)
Polígono con color opcional
Sourcepub fn draw_circle(
&mut self,
center: (f64, f64),
radius_norm: f64,
color: Option<Color>,
)
pub fn draw_circle( &mut self, center: (f64, f64), radius_norm: f64, color: Option<Color>, )
Dibuja un círculo en coordenadas normalizadas (0.0-1.0)
Sourcepub fn pie_chart(&mut self, slices: &[(f64, Option<Color>)])
pub fn pie_chart(&mut self, slices: &[(f64, Option<Color>)])
Gráfico de Pastel (Estilo Radar/Radios)
Sourcepub fn text(
&mut self,
text: &str,
x_norm: f64,
y_norm: f64,
color: Option<Color>,
)
pub fn text( &mut self, text: &str, x_norm: f64, y_norm: f64, color: Option<Color>, )
Escribe texto en coordenadas del gráfico (0.0 - 1.0)
Sourcepub fn line_chart(&mut self, points: &[(f64, f64)], color: Option<Color>)
pub fn line_chart(&mut self, points: &[(f64, f64)], color: Option<Color>)
Gráfico de Línea (conecta puntos ordenados)
pub fn draw_grid(&mut self, divs_x: usize, divs_y: usize, color: Option<Color>)
pub fn plot_function<F>( &mut self, func: F, min_x: f64, max_x: f64, 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 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