pub enum Artist {
Show 16 variants
Line(LineArtist),
Scatter(ScatterArtist),
Bar(BarArtist),
Histogram(HistArtist),
FillBetween(FillBetweenArtist),
Step(StepArtist),
Stem(StemArtist),
BoxPlot(BoxPlotArtist),
ErrorBar(ErrorBarArtist),
Heatmap(HeatmapArtist),
Pie(PieArtist),
Violin(ViolinArtist),
Contour(ContourArtist),
Polar(PolarArtist),
Hexbin(HexbinArtist),
Waterfall(WaterfallArtist),
}Expand description
A visual element drawn on an axes.
Artist is the primary unit of chart content. Each variant wraps a
concrete artist struct that stores the data, colors, and styling needed
to render one visual element. The enum provides convenience accessors
(label, color,
data_bounds) that dispatch to the inner type.
Variants§
Line(LineArtist)
A line chart connecting (x, y) points.
Scatter(ScatterArtist)
A scatter plot of individual points.
Bar(BarArtist)
A bar chart (vertical or horizontal).
Histogram(HistArtist)
A histogram (binned frequency distribution).
FillBetween(FillBetweenArtist)
A filled region between two y-series sharing a common x-series.
Step(StepArtist)
A step (staircase) chart connecting data points.
Stem(StemArtist)
A stem (lollipop) chart from data points.
BoxPlot(BoxPlotArtist)
A box-and-whisker plot showing distribution summaries.
ErrorBar(ErrorBarArtist)
An error bar plot showing data points with uncertainty bars.
Heatmap(HeatmapArtist)
A heatmap showing a 2D grid of values mapped to colors.
Pie(PieArtist)
A pie chart showing proportional wedge slices.
Violin(ViolinArtist)
A violin plot showing kernel density estimates of distributions.
Contour(ContourArtist)
A contour or filled contour plot over a 2D grid.
Polar(PolarArtist)
A polar line or filled radar chart in polar coordinates.
Hexbin(HexbinArtist)
A hexagonal binning plot showing point density as colored hexagons.
Waterfall(WaterfallArtist)
A waterfall chart showing cumulative positive and negative changes.
Implementations§
Source§impl Artist
impl Artist
Sourcepub fn label(&self) -> Option<&str>
pub fn label(&self) -> Option<&str>
Returns the legend label for this artist, if one has been set.
The legend renderer uses this to decide which artists appear in the legend. Artists without a label are silently skipped.
Sourcepub fn color(&self) -> Color
pub fn color(&self) -> Color
Returns the primary color of this artist.
Used by the legend to draw a color swatch next to the label, and by any other component that needs to identify an artist’s color (e.g. tooltip rendering).
Sourcepub fn data_bounds(&self) -> (f64, f64, f64, f64)
pub fn data_bounds(&self) -> (f64, f64, f64, f64)
Returns the data-space bounding box as (xmin, xmax, ymin, ymax).
The axes autoscaling logic calls this on every artist to compute the
tightest axis limits that contain all visible data. If a series is
empty or contains no finite values, the corresponding min/max pair
falls back to (0.0, 1.0) so that the axes always have a non-zero
extent.