Class QAccelPlot::ErrorBarSeries¶
ClassList > QAccelPlot > ErrorBarSeries
A hardware-accelerated QML item that draws error bars: a line from a low to a high bound at each data point, capped at both ends. More...
#include <ErrorBarSeries.hpp>
Inherits the following classes: QAccelPlot::PlotSeries
Inheritance diagram¶
flowchart TB
classQAccelPlot_1_1ErrorBarSeries["QAccelPlot::ErrorBarSeries"]
classQAccelPlot_1_1PlotSeries["QAccelPlot::PlotSeries"]
classQAccelPlot_1_1PlotSeries --> classQAccelPlot_1_1ErrorBarSeries
click classQAccelPlot_1_1PlotSeries "../classQAccelPlot_1_1PlotSeries/" "Open QAccelPlot::PlotSeries"
external_base_classQAccelPlot_1_1PlotSeries_1["QQuickItem"]
external_base_classQAccelPlot_1_1PlotSeries_1 --> classQAccelPlot_1_1PlotSeries
Public Types inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| enum | LegendSymbol Supported default legend symbols. |
Public Properties¶
| Type | Name |
|---|---|
| property qreal | capLength Length in pixels of the caps across the error bar, clamped to at least 0; 0 hides them. Default: 8. |
| property QColor | color Line color. Default: Colors.dark.seriesPrimary . |
| property QColor | hoverColor Color of the hovered error bar. Default: Colors.dark.hover ; an invalid color draws it incolor . |
| property qreal | hoverRadius Pick distance in pixels from an error bar or its caps, clamped to at least 0. Default: 6. |
| property int | hoveredIndex Read-only: index of the error bar under the cursor, or -1 when none. |
| property qreal | lineWidth Width in pixels of the error bars and their caps, clamped to at least 0. Default: 1.5. |
| property qreal | offset Shift of every error bar across its bounds, in data units of the other axis. Default: 0. |
| property Qt::Orientation | orientation Axis the bounds lie on: Qt.Vertical for the Y axis,Qt.Horizontal for the X axis. Default:Qt.Vertical . |
| property DataTransition * | transition Optional data transition animation applied when new data arrives. |
Public Properties inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| property int | count Read-only: number of records stored, including invalid ones. |
| property quint64 | dataRevision Revision incremented by every accepted change of the series' records. |
| property bool | hoverEnabled Whether the series reacts to the mouse cursor. Default: true . |
| property bool | hovered Read-only: true while the mouse cursor is over the series. |
| property SeriesInspection * | inspection Read-only constant: data queries for this series. |
| property LegendSymbol | legendSymbol Symbol style requested from the default legend. |
| property QString | name Identifying name used by the default legend. |
| property QRectF | plotRect Plot area in parent-item coordinates, assigned by PlotView . |
| property Axis * | xAxis Horizontal axis used for data-to-pixel coordinate mapping. |
| property Axis * | yAxis Vertical axis used for data-to-pixel coordinate mapping. |
Public Signals¶
| Type | Name |
|---|---|
| signal void | capLengthChanged Emitted when the capLength property changes. |
| signal void | colorChanged Emitted when the color property changes. |
| signal void | hoverColorChanged Emitted when the hoverColor property changes. |
| signal void | hoverRadiusChanged Emitted when the hoverRadius property changes. |
| signal void | hoveredIndexChanged Emitted when the hovered error bar changes. |
| signal void | lineWidthChanged Emitted when the lineWidth property changes. |
| signal void | offsetChanged Emitted when the offset property changes. |
| signal void | orientationChanged Emitted when the orientation property changes. |
| signal void | transitionChanged Emitted when the transition property changes. |
Public Signals inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| signal void | countChanged Emitted when the number of records changes. |
| signal void | dataRevisionChanged Emitted when the dataRevision property changes. |
| signal void | hoverEnabledChanged Emitted when the hoverEnabled property changes. |
| signal void | hoveredChanged Emitted when the hovered property changes. |
| signal void | legendEntryChanged Emitted when the result of legendEntry() orlegendEntries() changes. |
| signal void | legendSymbolChanged |
| signal void | nameChanged |
| signal void | plotRectChanged |
| signal void | xAxisChanged |
| signal void | yAxisChanged |
Public Functions¶
| Type | Name |
|---|---|
| ErrorBarSeries (QQuickItem * parent=nullptr) Constructs an ErrorBarSeries with the given__parent . |
|
| Q_INVOKABLE void | appendData (qreal x, qreal y, qreal low, qreal high) Appends the data point ( x _,_y _,_low _,_high ). Triggers a redraw. |
| Q_INVOKABLE void | appendErrorData (qreal x, qreal y, qreal error) Appends a data point at ( x _,_y ) with__error on both sides of the value. |
| Q_INVOKABLE void | appendErrorData (qreal x, qreal y, qreal minus, qreal plus) Appends a data point at ( x _,_y ) with__minus below and__plus above the value. Signs are ignored. |
| qreal | capLength () const Returns the cap length in pixels. |
| virtual Q_INVOKABLE void | clearData () override Removes all data points. |
| QColor | color () const Returns the line color. |
| bool | contains (const QPointF & point) override const Returns true when an error bar lies withinhoverRadius of item position__point . |
| Q_INVOKABLE QVariantMap | errorBarAt (int index) const Returns data point index as an object with x ,y ,low , andhigh properties, or an empty object when out of range. |
| Q_INVOKABLE int | errorBarIndexAt (const QPointF & position) const Returns the index of the error bar within hoverRadius of item position__position , or -1. |
| QColor | hoverColor () const Returns the color of the hovered error bar. |
| qreal | hoverRadius () const Returns the hover pick distance in pixels. |
| int | hoveredIndex () const Returns the index of the hovered error bar, or -1 if none. |
| qreal | lineWidth () const Returns the line width in pixels. |
| qreal | offset () const Returns the shift of every error bar across its bounds, in data units. |
| Qt::Orientation | orientation () const Returns the axis the bounds lie on. |
| void | setCapLength (qreal length) Sets the cap length to length pixels. Negative values are clamped to 0. |
| void | setColor (const QColor & color) Sets the line color to color . |
| Q_INVOKABLE void | setData (const QList< qreal > & xs, const QList< qreal > & ys, const QList< qreal > & lows, const QList< qreal > & highs) Replaces the data points with xs _,_ys _,_lows , and__highs . If the sizes differ, the shortest length is used. |
| void | setData (const std::vector< double > & xs, const std::vector< double > & ys, const std::vector< double > & lows, const std::vector< double > & highs) Replaces the data points with xs _,_ys _,_lows , and__highs . If the sizes differ, the shortest length is used. |
| void | setData (const double * data, int count) Replaces the series data with count data points copied from an interleaved double array. |
| void | setData (std::vector< double > && data, int count) Replaces the series data by moving an interleaved double buffer. |
| void | setData (const double * data, int count, const DataBounds & bounds) Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setData (std::vector< double > && data, int count, const DataBounds & bounds) Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setDataF (const float * data, int count) Replaces the series data with count data points copied from an interleaved float array. |
| void | setDataF (std::vector< float > && data, int count) Replaces the series data by moving an interleaved float buffer. |
| void | setDataF (const float * data, int count, const DataBounds & bounds) Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setDataF (std::vector< float > && data, int count, const DataBounds & bounds) Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| Q_INVOKABLE void | setErrorData (const QList< qreal > & xs, const QList< qreal > & ys, const QList< qreal > & errors) Replaces the data points with xs and__ys , each with an error from__errors on both sides of the value. |
| Q_INVOKABLE void | setErrorData (const QList< qreal > & xs, const QList< qreal > & ys, const QList< qreal > & minuses, const QList< qreal > & pluses) Replaces the data points with xs and__ys , each with an error from__minuses below and__pluses above the value. |
| void | setErrorData (const std::vector< double > & xs, const std::vector< double > & ys, const std::vector< double > & errors) Replaces the data points with xs and__ys , each with an error from__errors on both sides of the value. |
| void | setErrorData (const std::vector< double > & xs, const std::vector< double > & ys, const std::vector< double > & minuses, const std::vector< double > & pluses) Replaces the data points with xs and__ys , each with an error from__minuses below and__pluses above the value. |
| void | setHoverColor (const QColor & color) Sets the color of the hovered error bar to color . |
| void | setHoverRadius (qreal radius) Sets the hover pick distance to radius pixels. Negative values are clamped to 0. |
| void | setLineWidth (qreal width) Sets the line width to width pixels. Negative values are clamped to 0. |
| void | setOffset (qreal offset) Sets the shift of every error bar across its bounds to offset data units. |
| void | setOrientation (Qt::Orientation orientation) Sets the axis the bounds lie on to orientation . The stored data points are kept. |
| void | setTransition (DataTransition * transition) Sets the data transition to transition . |
| DataTransition * | transition () const Returns the active data transition, or nullptr if none. |
| ~ErrorBarSeries () override Destroys the series, ending its animation on the assigned transition. |
Public Functions inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| PlotSeries (QQuickItem * parent=nullptr) |
|
| virtual void | clearData () Removes all data points from the series. |
| virtual int | count () const Returns the number of records stored. The default is the number of stored data points. |
| quint64 | dataRevision () const Returns the current data revision. |
| bool | hoverEnabled () const Returns whether the series reacts to the mouse cursor. |
| bool | hovered () const Returns whether the mouse cursor is over the series. |
| SeriesInspection * | inspection () const Returns the data queries for this series; created on first use and owned by the series. |
| virtual QList< LegendEntry > | legendEntries () const Returns the legend rows of the series. Default: the legendEntry() , if any. |
| virtual std::optional< LegendEntry > | legendEntry () const Returns how a legend draws the series, or std::nullopt for no legend entry. Default: no entry. |
| LegendSymbol | legendSymbol () const |
| QString | name () const |
| QRectF | plotRect () const |
| void | postData (std::vector< double > && data, int count) Queues a moved double buffer for assignment on the series' thread. |
| void | postData (std::vector< float > && data, int count) Queues a moved float buffer for assignment on the series' thread. |
| void | setData (const double * data, int count) Replaces the series data with count data points copied from an interleaved double array. |
| void | setData (std::vector< double > && data, int count) Replaces the series data by moving an interleaved double buffer. |
| void | setData (const double * data, int count, const DataBounds & bounds) Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setData (std::vector< double > && data, int count, const DataBounds & bounds) Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setDataF (const float * data, int count) Replaces the series data with count data points copied from an interleaved float array. |
| void | setDataF (std::vector< float > && data, int count) Replaces the series data by moving an interleaved float buffer. |
| void | setDataF (const float * data, int count, const DataBounds & bounds) Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setDataF (std::vector< float > && data, int count, const DataBounds & bounds) Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setHoverEnabled (bool enabled) Sets whether the series reacts to the mouse cursor to enabled . |
| void | setLegendSymbol (LegendSymbol symbol) |
| void | setName (const QString & name) |
| void | setPlotRect (const QRectF & rect) Updates the series geometry to exactly cover rect . |
| void | setXAxis (Axis * axis) |
| void | setYAxis (Axis * axis) |
| Axis * | xAxis () const |
| std::optional< DataExtent > | xDataRange () const Returns the extent this series reports to its horizontal axis, or std::nullopt when it has none. |
| Axis * | yAxis () const |
| std::optional< DataExtent > | yDataRange () const Returns the extent this series reports to its vertical axis, or std::nullopt when it has none. |
| ~PlotSeries () override |
Protected Types inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| enum | CapacityOverflow What a series draws when its records outgrow its GPU capacity. |
| enum | DataChange How the records changed in a data update. |
Protected Attributes inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| bool | overRenderCapacity_ = {false}Whether the record count of the last updateRenderCapacity() exceededrenderCapacity_ . |
| int | renderCapacity_ = {std::numeric\_limits<int>::max()}Records the GPU buffers hold, as of the last updateRenderCapacity() ; the largestint before the first. |
Protected Functions¶
| Type | Name |
|---|---|
| virtual void | applyDataPoints (DataPointInput && input) override Stores input , animating it from the drawn error bars while a transition is enabled. |
| virtual void | onAxisScaleChanged () override Refreshes the hover lookup and repaints after a bound axis changes between linear and log scale. |
| virtual void | onDataPointsChanged (DataChange change, int previousCount) override Refreshes the hover lookup and the count after the data points changed. |
Protected Functions inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| PlotSeries (DataPointStore::Layout layout, DataPointWording wording, QQuickItem * parent) Creates a series whose data points have layout _;_wording names them in warnings. |
|
| void | appendDataPoint (const double * coordinates) Appends one double data point and widens the data ranges by its valid coordinates. |
| virtual void | applyDataPoints (DataPointInput && input) Applies data points passed to setData() orsetDataF() . |
| virtual DataRanges | computeDataRanges () const Scans the records for their extents. The default implementation scans the data points. |
| virtual int | dataPointValueCount () const Returns the number of values per data point that setData() andsetDataF() take. |
| DataPointStore & | dataPoints () Returns the data points of the series. |
| const DataPointStore & | dataPoints () const Returns the data points of the series. |
| bool | event (QEvent * event) override Withholds hover events from a series beneath another series under the cursor. |
| void | extendXDataRange (qreal x) Widens the X extent to include x and notifies the bound axes. |
| void | extendYDataRange (qreal y) Widens the Y extent to include y . A non-finite__y leaves the extent unchanged. |
| virtual bool | inspectionAvailable () const Returns false while the records are ambiguous, such as during a data transition. Default: true. |
| void | inspectionDataChanged (DataChange change=DataChange::Replaced) Advances the data revision and refreshes the data queries. Call after every accepted record change. |
| virtual InspectionDataPoint | inspectionDataPointAt (const QPointF & position) const Returns the record drawn at the series-local position as a data point. Default: unsupported. |
| virtual InspectionRecord | inspectionRecord (int index) const Returns the native record at index for series that are not plain XY series. Default: unsupported. |
| virtual InspectionRecord | inspectionRecordAt (const QPointF & position) const Returns the native record drawn at the series-local position . Default: unsupported. |
| virtual Internal::InspectionSource | inspectionSource () const Returns a view of the XY records that data point queries search. The default has none. |
| void | invalidateDataRanges () Discards the cached extents and notifies the bound axes. |
| void | invalidateInspection () Refreshes the data queries after record validity changed without a data change, such as an axis scale switch. |
| bool | logScaleX () const Returns whether the horizontal axis is logarithmic; false without an axis. |
| bool | logScaleY () const Returns whether the vertical axis is logarithmic; false without an axis. |
| void | notifyDataPointsChanged (DataChange change, int previousCount) Finishes a change of the data points: data ranges, onDataPointsChanged() ,countChanged() , data queries, and a repaint. |
| virtual void | onAxisRangeChanged () Called when the viewport of a bound axis changes. The default implementation schedules a repaint. |
| virtual void | onAxisScaleChanged () Called when a bound axis switches between linear and logarithmic scale, or a different axis is bound. |
| virtual void | onDataPointsChanged (DataChange change, int previousCount) Called after the data points changed, before the data queries are refreshed. The default does nothing. |
| virtual bool | positionInspectionSupported () const Returns whether inspectionDataPointAt() matches records drawn as areas, such as heatmap cells. Default: false. |
| virtual bool | recordInspectionSupported () const Returns whether inspectionRecord() andinspectionRecordAt() answer for this series. Default: false. |
| QRectF | resolvePlotRect () const Returns the plot area to render into: plotRect when set, otherwise the item's current size. |
| void | setHovered (bool hovered) Sets the hovered property to hovered . Called by the hover handling of a series. |
| void | storeDataPoints (DataPointInput && input) Stores input as the data points and finishes the change. |
| void | supportHover () Makes the series accept hover events while hoverEnabled istrue . |
| void | updateRenderCapacity (int capacity, int recordCount, CapacityOverflow overflow=CapacityOverflow::DropsExcess) Stores capacity , the number of records the GPU buffers hold, and warns when__recordCount newly exceeds it. |
| bool | validateDataSize (std::size_t valueCount, int count, bool floatData, int valuesPerDataPoint=0) const Returns whether valueCount values hold__count data points; warns otherwise. |
| bool | validateRawDataArguments (const void * data, int count) const Returns whether data and__count are valid arguments for copying data points; warns otherwise. |
Detailed Description¶
Each data point is an (x, y, low, high) quadruple. orientation selects the axis that low and high lie on: a vertical error bar is drawn at x from low to high along the Y axis, and a horizontal one at y from low to high along the X axis. The other coordinate, y for vertical and x for horizontal error bars, is the value the bounds belong to. The series does not draw it: draw the values with a PointCloud or LineCurve declared after the error bars, so that its markers are drawn and hovered on top. The same xs and ys then feed both series.
setErrorData() and appendErrorData() take errors relative to the value instead of bounds, one for both sides or one per side, and store the bounds they give. A NaN error gives a NaN bound.
Data points are uploaded to the GPU as a float data texture once per data change; panning, zooming, and changing lineWidth, capLength, or offset only change shader uniforms. The setData() overloads keep doubles and upload them relative to an origin near the viewport, so large coordinates such as epoch timestamps stay precise. The setDataF() overloads store floats and upload them without conversion.
QAccelPlot.ErrorBarSeries {
xAxis: plot.xAxis
yAxis: plot.yAxis
Component.onCompleted: setErrorData([1, 2, 3], [4.2, 5.1, 4.7], [0.3, 0.5, 0.2])
}
** **
A data point is not drawn or hovered when its position (x for vertical, y for horizontal error bars) is NaN or ±Inf, or not strictly positive on a log-scale axis, or when its value is NaN. A NaN bound leaves out that half of the error bar, which then runs from the value to the other bound. An infinite bound, and a bound that is not strictly positive on a log-scale axis, extends the error bar past the plot edge without a cap. low may be above high. Auto-ranging counts every valid coordinate on its own.
** **
hoveredIndex is the error bar within hoverRadius pixels of the cursor, the nearest one when several are, and the one with the highest index on a tie. hoverColor draws it. Only the topmost series under the cursor is hovered: set hoverEnabled to false to leave hover to the series beneath.
** **
Assign a MorphTransition or DrawTransition to transition to animate data updates. With MorphTransition, error bars move to their new position, value, and bounds. New error bars appear, and removed ones disappear, at once. count, errorBarAt(), the data ranges, and inspection use the new data from the start of the animation, while hover picks the error bars as drawn. While a transition is enabled, the setDataF() overloads store doubles. appendData(), appendErrorData(), clearData(), and replacing, clearing, or cancelling transition, skip to the new data.
** **
At most 16,777,216 (2^24) error bars are drawn, fewer on GPUs whose maximum texture size is below * Error bars beyond the limit are not drawn or hovered, and a warning is logged once.
See also: PointCloud, LineCurve, BandSeries, MorphTransition, DrawTransition
Public Properties Documentation¶
property capLength¶
Length in pixels of the caps across the error bar, clamped to at least 0; 0 hides them. Default: 8.
property color¶
Line color. Default: Colors.dark.seriesPrimary .
property hoverColor¶
Color of the hovered error bar. Default: Colors.dark.hover ; an invalid color draws it incolor .
property hoverRadius¶
Pick distance in pixels from an error bar or its caps, clamped to at least 0. Default: 6.
property hoveredIndex¶
Read-only: index of the error bar under the cursor, or -1 when none.
property lineWidth¶
Width in pixels of the error bars and their caps, clamped to at least 0. Default: 1.5.
property offset¶
Shift of every error bar across its bounds, in data units of the other axis. Default: 0.
Bind it to BarSeries::barOffset to center error bars on grouped bars. Auto-ranging ignores it.
property orientation¶
Axis the bounds lie on:Qt.Vertical for the Y axis,Qt.Horizontal for the X axis. Default:Qt.Vertical .
property transition¶
Optional data transition animation applied when new data arrives.
Public Signals Documentation¶
signal capLengthChanged¶
Emitted when the capLength property changes.
signal colorChanged¶
Emitted when the color property changes.
signal hoverColorChanged¶
Emitted when the hoverColor property changes.
signal hoverRadiusChanged¶
Emitted when the hoverRadius property changes.
signal hoveredIndexChanged¶
Emitted when the hovered error bar changes.
signal lineWidthChanged¶
Emitted when the lineWidth property changes.
signal offsetChanged¶
Emitted when the offset property changes.
signal orientationChanged¶
Emitted when the orientation property changes.
signal transitionChanged¶
Emitted when the transition property changes.
Public Functions Documentation¶
function ErrorBarSeries¶
Constructs an ErrorBarSeries with the given__parent .
function appendData¶
Appends the data point ( x _,_y _,_low _,_high ). Triggers a redraw.
function appendErrorData¶
Appends a data point at ( x _,_y ) with__error on both sides of the value.
The value is y for vertical and x for horizontal error bars. The sign of error is ignored.
function appendErrorData¶
Appends a data point at ( x _,_y ) with__minus below and__plus above the value. Signs are ignored.
Q_INVOKABLE void QAccelPlot::ErrorBarSeries::appendErrorData (
qreal x,
qreal y,
qreal minus,
qreal plus
)
function capLength¶
Returns the cap length in pixels.
function clearData¶
Removes all data points.
Implements QAccelPlot::PlotSeries::clearData
function color¶
Returns the line color.
function contains¶
Returns true when an error bar lies withinhoverRadius of item position__point .
Hover delivery uses this test, so stacked series underneath still receive hover events away from the error bars.
function errorBarAt¶
Returns data point index as an object withx ,y ,low , andhigh properties, or an empty object when out of range.
function errorBarIndexAt¶
Returns the index of the error bar within hoverRadius of item position__position , or -1.
The nearest error bar wins; on a tie, the one with the highest index.
function hoverColor¶
Returns the color of the hovered error bar.
function hoverRadius¶
Returns the hover pick distance in pixels.
function hoveredIndex¶
Returns the index of the hovered error bar, or -1 if none.
function lineWidth¶
Returns the line width in pixels.
function offset¶
Returns the shift of every error bar across its bounds, in data units.
function orientation¶
Returns the axis the bounds lie on.
function setCapLength¶
Sets the cap length to length pixels. Negative values are clamped to 0.
function setColor¶
Sets the line color to color .
function setData¶
Replaces the data points with xs _,_ys _,_lows , and__highs . If the sizes differ, the shortest length is used.
Q_INVOKABLE void QAccelPlot::ErrorBarSeries::setData (
const QList< qreal > & xs,
const QList< qreal > & ys,
const QList< qreal > & lows,
const QList< qreal > & highs
)
function setData¶
Replaces the data points with xs _,_ys _,_lows , and__highs . If the sizes differ, the shortest length is used.
void QAccelPlot::ErrorBarSeries::setData (
const std::vector< double > & xs,
const std::vector< double > & ys,
const std::vector< double > & lows,
const std::vector< double > & highs
)
function setData¶
Replaces the series data with count data points copied from an interleaved double array.
See the class description for the data point layout of each series.
function setData¶
Replaces the series data by moving an interleaved double buffer.
function setData¶
Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void QAccelPlot::ErrorBarSeries::setData (
const double * data,
int count,
const DataBounds & bounds
)
function setData¶
Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void QAccelPlot::ErrorBarSeries::setData (
std::vector< double > && data,
int count,
const DataBounds & bounds
)
function setDataF¶
Replaces the series data with count data points copied from an interleaved float array.
function setDataF¶
Replaces the series data by moving an interleaved float buffer.
function setDataF¶
Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void QAccelPlot::ErrorBarSeries::setDataF (
const float * data,
int count,
const DataBounds & bounds
)
function setDataF¶
Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void QAccelPlot::ErrorBarSeries::setDataF (
std::vector< float > && data,
int count,
const DataBounds & bounds
)
function setErrorData¶
Replaces the data points with xs and__ys , each with an error from__errors on both sides of the value.
Q_INVOKABLE void QAccelPlot::ErrorBarSeries::setErrorData (
const QList< qreal > & xs,
const QList< qreal > & ys,
const QList< qreal > & errors
)
If the sizes differ, the shortest length is used. The signs of the errors are ignored.
function setErrorData¶
Replaces the data points with xs and__ys , each with an error from__minuses below and__pluses above the value.
Q_INVOKABLE void QAccelPlot::ErrorBarSeries::setErrorData (
const QList< qreal > & xs,
const QList< qreal > & ys,
const QList< qreal > & minuses,
const QList< qreal > & pluses
)
If the sizes differ, the shortest length is used. The signs of the errors are ignored.
function setErrorData¶
Replaces the data points with xs and__ys , each with an error from__errors on both sides of the value.
void QAccelPlot::ErrorBarSeries::setErrorData (
const std::vector< double > & xs,
const std::vector< double > & ys,
const std::vector< double > & errors
)
function setErrorData¶
Replaces the data points with xs and__ys , each with an error from__minuses below and__pluses above the value.
void QAccelPlot::ErrorBarSeries::setErrorData (
const std::vector< double > & xs,
const std::vector< double > & ys,
const std::vector< double > & minuses,
const std::vector< double > & pluses
)
function setHoverColor¶
Sets the color of the hovered error bar to color .
function setHoverRadius¶
Sets the hover pick distance to radius pixels. Negative values are clamped to 0.
function setLineWidth¶
Sets the line width to width pixels. Negative values are clamped to 0.
function setOffset¶
Sets the shift of every error bar across its bounds to offset data units.
function setOrientation¶
Sets the axis the bounds lie on to orientation . The stored data points are kept.
function setTransition¶
Sets the data transition to transition .
function transition¶
Returns the active data transition, or nullptr if none.
function ~ErrorBarSeries¶
Destroys the series, ending its animation on the assigned transition.
Protected Functions Documentation¶
function applyDataPoints¶
Stores input , animating it from the drawn error bars while a transition is enabled.
Implements QAccelPlot::PlotSeries::applyDataPoints
function onAxisScaleChanged¶
Refreshes the hover lookup and repaints after a bound axis changes between linear and log scale.
Implements QAccelPlot::PlotSeries::onAxisScaleChanged
function onDataPointsChanged¶
Refreshes the hover lookup and the count after the data points changed.
virtual void QAccelPlot::ErrorBarSeries::onDataPointsChanged (
DataChange change,
int previousCount
) override
Implements QAccelPlot::PlotSeries::onDataPointsChanged
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/series/ErrorBarSeries.hpp