Struct poloto::DataBuilder [−][src]
Insert svg data after the svg element, but before the plot elements.
Implementations
impl DataBuilder<&'static str>
[src]
impl<D: Display> DataBuilder<D>
[src]
pub fn push_css_default(self) -> DataBuilder<impl Display>
[src]
Push the default poloto css styling.
pub fn push_default_css_with_variable(self) -> DataBuilder<impl Display>
[src]
Instead of the default style, use one that adds variables.
This injects what is produced by StyleBuilder::build_with_css_variables
instead of
the default StyleBuilder::build
.
If you embed the generated svg into a html file, then you can add this example:
.poloto{
--poloto_bg_color:"black";
--poloto_fg_color:"white;
--poloto_color0:"red";
--poloto_color1:"green";
--poloto_color2:"yellow";
--poloto_color3:"orange";
--poloto_color4:"purple";
--poloto_color5:"pink";
--poloto_color6:"aqua";
--poloto_color7:"red";
}
By default these variables are not defined, so the svg falls back on some default colors.
pub fn push(self, a: impl Display) -> DataBuilder<impl Display>
[src]
User can inject some svg elements using this function. They will be inserted right after the svg and default svg tags.
You can override the css in regular html if you embed the generated svg. This gives you a lot of flexibility giving your the power to dynamically change the theme of your svg.
However, if you want to embed the svg as an image, you lose this ability. If embedding as IMG is desired, instead the user can insert a custom style into the generated svg itself.
Trait Implementations
Auto Trait Implementations
impl<D> RefUnwindSafe for DataBuilder<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> Send for DataBuilder<D> where
D: Send,
D: Send,
impl<D> Sync for DataBuilder<D> where
D: Sync,
D: Sync,
impl<D> Unpin for DataBuilder<D> where
D: Unpin,
D: Unpin,
impl<D> UnwindSafe for DataBuilder<D> where
D: UnwindSafe,
D: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,