23#ifndef QTRADINGVIEW_AXISRENDERER_H
24#define QTRADINGVIEW_AXISRENDERER_H
31#include "QTradingView/ViewPort.h"
32#include "QTradingView/Pane.h"
33#include "QTradingView/qtradingview_global.h"
35namespace QTradingView {
74 void setTextColor(
const QColor& color);
80 void setTickColor(
const QColor& color);
86 void setBorderColor(
const QColor& color);
92 void setBackgroundColor(
const QColor& color);
98 void setAxisWidth(
int width);
107 void drawXAxis(QPainter* painter,
const QRectF& axisRect,
117 void drawYAxis(QPainter* painter,
const QRectF& leftAxisRect,
118 const QRectF& rightAxisRect,
const Pane* pane);
126 static std::vector<TimeLabel> calculateXAxisLabels(
const ViewPort& viewport,
const Series* series);
131 QColor m_borderColor;
132 QColor m_backgroundColor;
Renders chart axes, ticks, and labels for QTradingView.
Definition AxisRenderer.h:63
Represents a chart pane that contains one or more data series.
Definition Pane.h:44
Abstract base class for data series in QTradingView charts.
Definition Series.h:49
Manages the visible range and pixel mapping for chart bars.
Definition ViewPort.h:39
Represents a label for a specific time on the X-axis.
Definition AxisRenderer.h:42
QString label
The text to display for the label.
Definition AxisRenderer.h:50
qint64 msSecsSinceEpoch
Milliseconds since epoch for the label position.
Definition AxisRenderer.h:46
int dataIndex
The index in the data series corresponding to this label.
Definition AxisRenderer.h:54