Represents a line chart series in QTradingView.
More...
#include <LineSeries.h>
|
| | LineSeries (const QList< DataPoint > &data={}) |
| | Constructs a LineSeries with optional initial data.
|
| |
|
| ~LineSeries () override |
| | Destroys the LineSeries object.
|
| |
| void | setData (const QList< DataPoint > &data) |
| | Sets the data points for the series.
|
| |
| const QList< DataPoint > & | data () const |
| | Returns the current data points.
|
| |
| qint64 | timestampAt (int index) const override |
| | Returns the timestamp for the data point at the given index.
|
| |
| int | dataCount () const override |
| | Returns the number of data points in the series.
|
| |
|
void | setColor (const QColor &color) |
| |
|
void | setLineWidth (double width) |
| |
|
void | setLineStyle (Qt::PenStyle style) |
| |
|
void | setAntialiasing (bool enabled) |
| |
| void | render (QPainter *painter, const ViewPort &viewport, IScale *scale) override |
| | Renders the series within the given viewport and scale.
|
| |
| bool | hitTest (const QPointF &point, int &outIndex) const override |
| | Performs hit testing to find the nearest data point to the given position.
|
| |
| void | calculateRange (int startIndex, int endIndex, double &outMin, double &outMax) const override |
| | Calculates the data range (min/max values) within the given index range.
|
| |
| | Series (SeriesType type) |
| | Constructs a Series of the given type.
|
| |
|
virtual | ~Series ()=default |
| | Virtual destructor for Series.
|
| |
| SeriesType | type () const |
| | Returns the type of the series.
|
| |
Represents a line chart series in QTradingView.
LineSeries manages a collection of data points and renders them as a line chart. Supports data updates and style customization.
◆ LineSeries()
| QTradingView::LineSeries::LineSeries |
( |
const QList< DataPoint > & |
data = {} | ) |
|
|
explicit |
Constructs a LineSeries with optional initial data.
- Parameters
-
◆ calculateRange()
| void QTradingView::LineSeries::calculateRange |
( |
int |
startIndex, |
|
|
int |
endIndex, |
|
|
double & |
outMin, |
|
|
double & |
outMax |
|
) |
| const |
|
overridevirtual |
Calculates the data range (min/max values) within the given index range.
- Parameters
-
| startIndex | Start index of the range. |
| endIndex | End index of the range. |
| outMin | Output parameter for the minimum value. |
| outMax | Output parameter for the maximum value. |
Implements QTradingView::Series.
◆ data()
| const QList< DataPoint > & QTradingView::LineSeries::data |
( |
| ) |
const |
Returns the current data points.
- Returns
- List of DataPoint objects.
◆ dataCount()
| int QTradingView::LineSeries::dataCount |
( |
| ) |
const |
|
overridevirtual |
Returns the number of data points in the series.
- Returns
- Data point count.
Implements QTradingView::Series.
◆ hitTest()
| bool QTradingView::LineSeries::hitTest |
( |
const QPointF & |
point, |
|
|
int & |
outIndex |
|
) |
| const |
|
overridevirtual |
Performs hit testing to find the nearest data point to the given position.
- Parameters
-
| point | Position to test. |
| outIndex | Output parameter for the nearest data point index. |
- Returns
- True if a data point was hit, false otherwise.
Implements QTradingView::Series.
◆ render()
| void QTradingView::LineSeries::render |
( |
QPainter * |
painter, |
|
|
const ViewPort & |
viewport, |
|
|
IScale * |
scale |
|
) |
| |
|
overridevirtual |
Renders the series within the given viewport and scale.
- Parameters
-
| painter | QPainter instance for drawing. |
| viewport | Viewport defining the area to render. |
| scale | Scale used for rendering. |
Implements QTradingView::Series.
◆ setData()
| void QTradingView::LineSeries::setData |
( |
const QList< DataPoint > & |
data | ) |
|
Sets the data points for the series.
- Parameters
-
◆ timestampAt()
| qint64 QTradingView::LineSeries::timestampAt |
( |
int |
index | ) |
const |
|
overridevirtual |
Returns the timestamp for the data point at the given index.
- Parameters
-
- Returns
- Timestamp in milliseconds.
Implements QTradingView::Series.
The documentation for this class was generated from the following files:
- include/QTradingView/series/LineSeries.h
- src/series/LineSeries.cpp