Renders chart axes, ticks, and labels for QTradingView.
More...
#include <AxisRenderer.h>
|
|
| AxisRenderer () |
| | Constructs an AxisRenderer with default settings.
|
| |
| void | setTextColor (const QColor &color) |
| | Sets the color of axis text labels.
|
| |
| void | setTickColor (const QColor &color) |
| | Sets the color of axis ticks.
|
| |
| void | setBorderColor (const QColor &color) |
| | Sets the color of the axis border.
|
| |
| void | setBackgroundColor (const QColor &color) |
| | Sets the background color of the axis.
|
| |
| void | setAxisWidth (int width) |
| | Sets the width of the axis.
|
| |
| void | drawXAxis (QPainter *painter, const QRectF &axisRect, const ViewPort &viewport, const Series *series) |
| | Draws the X-axis.
|
| |
| void | drawYAxis (QPainter *painter, const QRectF &leftAxisRect, const QRectF &rightAxisRect, const Pane *pane) |
| | Draws the Y-axis.
|
| |
Renders chart axes, ticks, and labels for QTradingView.
AxisRenderer provides customization for axis appearance and handles drawing of axis lines, ticks, and time labels.
◆ calculateXAxisLabels()
| std::vector< TimeLabel > QTradingView::AxisRenderer::calculateXAxisLabels |
( |
const ViewPort & |
viewport, |
|
|
const Series * |
series |
|
) |
| |
|
static |
Calculates the labels for the X-axis.
- Parameters
-
| viewport | The current viewport settings. |
| series | The data series being displayed. |
- Returns
- A vector of TimeLabel structures containing label information.
◆ drawXAxis()
| void QTradingView::AxisRenderer::drawXAxis |
( |
QPainter * |
painter, |
|
|
const QRectF & |
axisRect, |
|
|
const ViewPort & |
viewport, |
|
|
const Series * |
series |
|
) |
| |
Draws the X-axis.
- Parameters
-
| painter | The QPainter instance used for drawing. |
| axisRect | The rectangle area for the axis. |
| viewport | The current viewport settings. |
| series | The data series being displayed. |
◆ drawYAxis()
| void QTradingView::AxisRenderer::drawYAxis |
( |
QPainter * |
painter, |
|
|
const QRectF & |
leftAxisRect, |
|
|
const QRectF & |
rightAxisRect, |
|
|
const Pane * |
pane |
|
) |
| |
Draws the Y-axis.
- Parameters
-
| painter | The QPainter instance used for drawing. |
| leftAxisRect | The rectangle area for the left Y-axis. |
| rightAxisRect | The rectangle area for the right Y-axis. |
| pane | The pane containing the series. |
◆ setAxisWidth()
| void QTradingView::AxisRenderer::setAxisWidth |
( |
int |
width | ) |
|
Sets the width of the axis.
- Parameters
-
| width | The axis width in pixels. |
◆ setBackgroundColor()
| void QTradingView::AxisRenderer::setBackgroundColor |
( |
const QColor & |
color | ) |
|
Sets the background color of the axis.
- Parameters
-
| color | The background color. |
◆ setBorderColor()
| void QTradingView::AxisRenderer::setBorderColor |
( |
const QColor & |
color | ) |
|
Sets the color of the axis border.
- Parameters
-
◆ setTextColor()
| void QTradingView::AxisRenderer::setTextColor |
( |
const QColor & |
color | ) |
|
Sets the color of axis text labels.
- Parameters
-
◆ setTickColor()
| void QTradingView::AxisRenderer::setTickColor |
( |
const QColor & |
color | ) |
|
Sets the color of axis ticks.
- Parameters
-
The documentation for this class was generated from the following files:
- include/QTradingView/renderer/AxisRenderer.h
- src/renderer/AxisRenderer.cpp