I'm using TChart Pro Ver 7 together with Builder C++ Ver 7.
My problem has to do with auto-resizing lable and title items on custom axes. I have read and searched through all existing forums and can not find a solution.
In many discussions it is suggested that the "Series->Axis->TitleSize and Series->Axis->LabelsSize" be manipulated but this has no effect. I mean this literally, if I assign values to these properties at runtime, I see no effect on the displayed chart.
I must also add that I do not use the LeftAxis and BottomAxis of the TChart object, only "Chart->CustomAxes->Add()". With this, I add my own custom axes to the Series->CustomVertAxis and Series->CustomHorizAxis.
Here is my example code...
Code: Select all
// 1 - Add my vertical axis...
Chart->CustomAxes->Add();
Chart->CustomAxes->Items[0]->PositionPercent = 0;
Chart->CustomAxes->Items[0]->StartPosition = 0;
Chart->CustomAxes->Items[0]->EndPosition = 100;
Chart->CustomAxes->Items[0]->Title->Caption = "Vertical Custom Axis";
Chart->CustomAxes->Items[0]->Title->Angle = 0;
Chart->CustomAxes->Items[0]->TitleSize = 0;
Chart->CustomAxes->Items[0]->Labels = true;
Chart->CustomAxes->Items[0]->LabelsSize = 0;
Chart->CustomAxes->Items[0]->LabelsAngle = 0;
Chart->CustomAxes->Items[0]->Horizontal = false;
Chart->CustomAxes->Items[0]->AutomaticMaximum = true;
Chart->CustomAxes->Items[0]->AutomaticMinimum = true;
// 2 - Add my horizontal axis...
Chart->CustomAxes->Add();
Chart->CustomAxes->Items[1]->PositionPercent = 0;
Chart->CustomAxes->Items[1]->StartPosition = 0;
Chart->CustomAxes->Items[1]->EndPosition = 100;
Chart->CustomAxes->Items[1]->Title->Caption = "Horizontal Custom Axis";
Chart->CustomAxes->Items[1]->Title->Angle = 0;
Chart->CustomAxes->Items[1]->TitleSize = 0;
Chart->CustomAxes->Items[1]->Labels = true;
Chart->CustomAxes->Items[1]->LabelsSize = 0;
Chart->CustomAxes->Items[1]->LabelsAngle = 90;
Chart->CustomAxes->Items[1]->Horizontal = true;
Chart->CustomAxes->Items[1]->AutomaticMaximum = true;
Chart->CustomAxes->Items[1]->AutomaticMinimum = true;
// 3 - Now assign to my series...
Series1->Add(10);
Series1->CustomVertAxis = Chart->CustomAxes->Items[0];
Series1->CustomHorizAxis = Chart->CustomAxes->Items[1];
Series2->Add(10);
Series2->CustomVertAxis = Chart->CustomAxes->Items[0];
Series2->CustomHorizAxis = Chart->CustomAxes->Items[1];
Q2 - How do I resize Title and Labels on a Custom Axis?(Even though I manipulate Series->Axis->TitleSize and Series->Axis->LabelsSize.)
Regards John.