class EE::UI::Charts::LineSeries¶
Overview¶
One model-owned line. More…
#include <uichart.hpp> class LineSeries { public: // methods const String& name() const; ChartAxis& xAxis() const; ChartAxis& yAxis() const; void setXAxis(ChartAxis& axis); void setYAxis(ChartAxis& axis); void setVisible(bool visible); bool visible() const; void setColor(Color color); Color color() const; bool hasCustomColor() const; void setFilled(bool filled); bool filled() const; void setFillColor(std::optional<Color> color); const std::optional<Color>& fillColor() const; void setWidth(Float width); Float width() const; void setJoin(LineJoin join); LineJoin join() const; void setCap(LineCap cap); LineCap cap() const; void setInterpolation(LineInterpolation interpolation); LineInterpolation interpolation() const; void setMiterLimit(Float limit); Float miterLimit() const; Uint64 geometryRevision() const; void setPoints(std::vector<ChartPoint> points); void setPoints(std::span<const double> xs, std::span<const double> ys); void setValues(std::span<const double> ys, double start = 0.0, double step = 1.0); void setDataSource(std::shared_ptr<XYDataSource> source); std::shared_ptr<XYDataSource> dataSource() const; void setTooltipProvider(PointTooltipProvider provider); const PointTooltipProvider& tooltipProvider() const; };
Detailed Documentation¶
One model-owned line. Its axes are borrowed from the same ChartModel; neither this object nor a UIChart owns them separately. A series can share its data source with other series.
Methods¶
void setXAxis(ChartAxis& axis)
The axis must belong to this series’ model and outlive the series.
void setYAxis(ChartAxis& axis)
The axis must belong to this series’ model and outlive the series.
void setColor(Color color)
Overrides the theme’s default series color.
void setFilled(bool filled)
Fill the area between the line and the plot’s bottom edge. Disabled by default.
void setFillColor(std::optional<Color> color)
Overrides the translucent line color used by the fill; null restores the default.
void setWidth(Float width)
Stroke width in device-independent pixels.
void setInterpolation(LineInterpolation interpolation)
Changes line geometry; defaults to Linear.
void setMiterLimit(Float limit)
Maximum miter extension as a multiple of half the line width.
void setPoints(std::vector<ChartPoint> points)
Replaces the samples with an owned data source, moving the vector when possible.
void setPoints(std::span<const double> xs, std::span<const double> ys)
Copies paired X/Y samples into an owned data source.
void setValues(std::span<const double> ys, double start = 0.0, double step = 1.0)
Copies Y samples with generated X values: start + index * step.
void setDataSource(std::shared_ptr<XYDataSource> source)
Shares ownership of the source; it may be updated independently of the UIChart.
void setTooltipProvider(PointTooltipProvider provider)
Replaces the optional callback used for hover text.