pub struct RadialLine<T> { /* private fields */ }Expand description
A radial line generator, like d3.lineRadial.
Points are placed around the center of the plot bounds. The angle
accessor returns the angle in radians, with 0 at 12 o’clock and positive
angles proceeding clockwise. The radius accessor returns the distance
(in pixels) from the center.
Call RadialLine::closed to connect the last point back to the first
(like d3.curveLinearClosed), and RadialLine::fill to fill the
enclosed polygon, e.g. for radar charts.
Unlike Line, the accessors also receive the datum index,
matching d3’s (d, i) accessor form, since radial charts typically derive
the angle from the index (e.g. i * TAU / n).
Implementations§
Source§impl<T> RadialLine<T>
impl<T> RadialLine<T>
pub fn new() -> RadialLine<T>
Sourcepub fn data<I>(self, data: I) -> RadialLine<T>where
I: IntoIterator<Item = T>,
pub fn data<I>(self, data: I) -> RadialLine<T>where
I: IntoIterator<Item = T>,
Set the data of the RadialLine.
Sourcepub fn angle<F>(self, angle: F) -> RadialLine<T>
pub fn angle<F>(self, angle: F) -> RadialLine<T>
Set the angle accessor of the RadialLine.
The accessor is called with the datum and its index, and returns the angle in radians, with 0 at 12 o’clock and positive angles proceeding clockwise.
Sourcepub fn radius<F>(self, radius: F) -> RadialLine<T>
pub fn radius<F>(self, radius: F) -> RadialLine<T>
Set the radius accessor of the RadialLine.
The accessor is called with the datum and its index, and returns the distance (in pixels) from the center.
Sourcepub fn closed(self) -> RadialLine<T>
pub fn closed(self) -> RadialLine<T>
Connect the last point back to the first, like d3.curveLinearClosed.
Sourcepub fn fill(self, fill: impl Into<Background>) -> RadialLine<T>
pub fn fill(self, fill: impl Into<Background>) -> RadialLine<T>
Set the fill color of the polygon enclosed by the RadialLine.
The fill path is always closed, regardless of RadialLine::closed.
Sourcepub fn stroke(self, stroke: impl Into<Background>) -> RadialLine<T>
pub fn stroke(self, stroke: impl Into<Background>) -> RadialLine<T>
Set the stroke color of the RadialLine.
Sourcepub fn stroke_width(self, stroke_width: impl Into<Pixels>) -> RadialLine<T>
pub fn stroke_width(self, stroke_width: impl Into<Pixels>) -> RadialLine<T>
Set the stroke width of the RadialLine.
Sourcepub fn dot(self) -> RadialLine<T>
pub fn dot(self) -> RadialLine<T>
Draw a dot on every point.
Sourcepub fn dot_size(self, dot_size: impl Into<Pixels>) -> RadialLine<T>
pub fn dot_size(self, dot_size: impl Into<Pixels>) -> RadialLine<T>
Set the size of the dots on the RadialLine.
Sourcepub fn dot_fill(self, fill: impl Into<Background>) -> RadialLine<T>
pub fn dot_fill(self, fill: impl Into<Background>) -> RadialLine<T>
Set the fill of the dots on the RadialLine.
Sourcepub fn dot_stroke(self, stroke: impl Into<Hsla>) -> RadialLine<T>
pub fn dot_stroke(self, stroke: impl Into<Hsla>) -> RadialLine<T>
Set the 1px border color of the dots on the RadialLine. Defaults to the dot fill when it is a solid color.
pub fn dot_fill_color(self, color: impl Into<Hsla>) -> RadialLine<T>
use dot_fill
pub fn dot_stroke_color(self, color: impl Into<Hsla>) -> RadialLine<T>
use dot_stroke
Trait Implementations§
Source§impl<T> Default for RadialLine<T>
impl<T> Default for RadialLine<T>
Source§fn default() -> RadialLine<T>
fn default() -> RadialLine<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for RadialLine<T>
impl<T> !Send for RadialLine<T>
impl<T> !Sync for RadialLine<T>
impl<T> !UnwindSafe for RadialLine<T>
impl<T> Freeze for RadialLine<T>
impl<T> Unpin for RadialLine<T>
impl<T> UnsafeUnpin for RadialLine<T>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().