How to draw an axis
Posted: Wed Aug 16, 2023 8:03 am
How to draw the red axis on a graph?
Using c++builder。
Using c++builder。
Steema Software - Customer Support Forums
https://974310.kinnakethk.tech/
Code: Select all
//Now add colorlinetool outside the min/max range of the data
TColorLineTool *line = new TColorLineTool(TrendChart);
TrendChart->Tools->Add(line);
line->AllowDrag = false;
line->NoLimitDrag = false;
line->Axis = axisVert;
line->Pen->Color = clBlue;
line->Pen->Width = 2;
line->Value = 32;
Code: Select all
//Add vertical axis
TChartAxis *axisVert = new TChartAxis(TrendChart);
axisVert->Maximum = dblMax + 1;
axisVert->Minimum = dblMin - 1;
axisVert->Grid->Visible = true;
axisVert->Automatic = false;
axisVert->AutomaticMinimum = false;
axisVert->AutomaticMaximum = false;
axisVert->PositionPercent = 0;
axisVert->Horizontal = false;
axisVert->OtherSide = false;
axisVert->Visible = true;
axisVert->LabelsFont->Color = clRed;
Code: Select all
Chart->Axes->left