pub struct ChartSeries<T> {
pub name: String,
pub color: Option<ColorProp>,
pub pattern: Option<SeriesPattern>,
pub visible: bool,
pub points: Vec<ChartDatum<T>>,
}Expand description
A named series of data points with an optional explicit color and a
visibility flag, used to construct a ChartModel (via
ChartModel::from_series_vec) or to describe one series’ desired
shape. Unlike the model, visible here is a plain bool — reactivity
lives in the model’s ChartModel::structure_version /
ChartModel::style_version signals, not in this construction DTO.
Fields§
§name: String§color: Option<ColorProp>§pattern: Option<SeriesPattern>The non-colour channel identifying this series — a dash pattern on a
line, a marker shape on a point, a hatch on a filled region. None
takes the pattern for the series’ position
(SeriesPattern::for_index), which is why the channel exists even
with no application code. Set it when a series’ identity must survive a
reorder. See SeriesPattern.
visible: bool§points: Vec<ChartDatum<T>>Implementations§
Source§impl<T> ChartSeries<T>
impl<T> ChartSeries<T>
pub fn new(name: impl Into<String>) -> Self
pub fn color(self, color: impl Into<ColorProp>) -> Self
Sourcepub fn pattern(self, pattern: SeriesPattern) -> Self
pub fn pattern(self, pattern: SeriesPattern) -> Self
Pin this series’ non-colour channel instead of taking the one its
position implies. See SeriesPattern.