QTradingView 1.0.0
A high-performance charting library built with C++ and Qt.
Loading...
Searching...
No Matches
QTradingView::AxisRenderer Class Reference

Renders chart axes, ticks, and labels for QTradingView. More...

#include <AxisRenderer.h>

Public Member Functions

 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.
 

Static Public Member Functions

static std::vector< TimeLabelcalculateXAxisLabels (const ViewPort &viewport, const Series *series)
 Calculates the labels for the X-axis.
 

Detailed Description

Renders chart axes, ticks, and labels for QTradingView.

AxisRenderer provides customization for axis appearance and handles drawing of axis lines, ticks, and time labels.

Member Function Documentation

◆ calculateXAxisLabels()

std::vector< TimeLabel > QTradingView::AxisRenderer::calculateXAxisLabels ( const ViewPort viewport,
const Series series 
)
static

Calculates the labels for the X-axis.

Parameters
viewportThe current viewport settings.
seriesThe 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
painterThe QPainter instance used for drawing.
axisRectThe rectangle area for the axis.
viewportThe current viewport settings.
seriesThe 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
painterThe QPainter instance used for drawing.
leftAxisRectThe rectangle area for the left Y-axis.
rightAxisRectThe rectangle area for the right Y-axis.
paneThe pane containing the series.

◆ setAxisWidth()

void QTradingView::AxisRenderer::setAxisWidth ( int  width)

Sets the width of the axis.

Parameters
widthThe axis width in pixels.

◆ setBackgroundColor()

void QTradingView::AxisRenderer::setBackgroundColor ( const QColor &  color)

Sets the background color of the axis.

Parameters
colorThe background color.

◆ setBorderColor()

void QTradingView::AxisRenderer::setBorderColor ( const QColor &  color)

Sets the color of the axis border.

Parameters
colorThe border color.

◆ setTextColor()

void QTradingView::AxisRenderer::setTextColor ( const QColor &  color)

Sets the color of axis text labels.

Parameters
colorThe text color.

◆ setTickColor()

void QTradingView::AxisRenderer::setTickColor ( const QColor &  color)

Sets the color of axis ticks.

Parameters
colorThe tick color.

The documentation for this class was generated from the following files: