pub struct Aria { /* private fields */ }
Expand description
The WAI-ARIA (Accessible Rich Internet Applications Suite) is a W3C standard that dedicates to make web content and web applications more accessible.
It is turned off by default, and needs to be turned on by setting enabled
to
true
.
Here’s a simple example that enables default decal pattern on a bar chart:
use charming::{
component::{Aria, Axis, Decal},
element::AxisType,
series::Bar,
Chart,
};
Chart::new()
.x_axis(
Axis::new()
.type_(AxisType::Category)
.data(vec!["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]),
)
.y_axis(Axis::new().type_(AxisType::Value))
.aria(Aria::new().enabled(true).decal(Decal::new().show(true)))
.series(Bar::new().data(vec![120, 200, 150, 80, 70, 110, 130]))
.series(Bar::new().data(vec![20, 40, 90, 40, 30, 70, 120]))
.series(Bar::new().data(vec![140, 230, 120, 50, 30, 150, 120]));
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Aria
impl RefUnwindSafe for Aria
impl Send for Aria
impl Sync for Aria
impl Unpin for Aria
impl UnwindSafe for Aria
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> 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