Single Custom Left Axes Does not behave the same as LeftAxis
Posted: Sat Nov 25, 2017 12:41 am
TeeChartPro v2017.22.170619 32Bit FMX
I have a requirement for multiple left axis with associated series with the user able to select which Axis and Series are to be shown.
To do this I implemented multiple Custom Axis with their associated series.
The problem is that if only custom axes are being displayed then I am unable to adjust or even under default conditions (LabelSize and TitleSize set to 0) get all the left axis labels and titles to show.
I have reduced this issue to
1. Create new project
2. Add TChart
3. Add the following code to be called from the forms constructor.
If I use the LeftAxis if then code then I get the following
If I use the CustomAxis if then code then I get the following
The only difference in the above is which axes is being used, Left or Custom.
I would expect to get the same result in both cases but I am not and I cannot figure out how to get the custom axis to behave the same as the Left Axis.
Any help would be appreciated.
I have a requirement for multiple left axis with associated series with the user able to select which Axis and Series are to be shown.
To do this I implemented multiple Custom Axis with their associated series.
The problem is that if only custom axes are being displayed then I am unable to adjust or even under default conditions (LabelSize and TitleSize set to 0) get all the left axis labels and titles to show.
I have reduced this issue to
1. Create new project
2. Add TChart
3. Add the following code to be called from the forms constructor.
Code: Select all
procedure TfrmPondLevelTest.SetupChart;
var
newSeries: TLineSeries;
customAxis: TChartAxis;
begin
Chart.ClearChart;
Chart.View3D := False;
Chart.Legend.Visible := False;
// Create new series
newSeries := TLineSeries.Create(Chart);
Chart.AddSeries(newSeries);
newSeries.Title := 'SERIES TITLE';
if False then
begin
// Series uses left axis
Chart.LeftAxis.Title.Caption := 'LEFT AXIS';
Chart.LeftAxis.LabelsSize := 25;
Chart.LeftAxis.TitleSize := 25;
end;
if True then
begin
// Series uses Custom Axis
customAxis := TChartAxis.Create(Chart.CustomAxes);
customAxis.Title.Caption := 'CUSTOM AXIS';
newSeries.CustomVertAxis := customAxis;
customAxis.LabelsSize := 25;
customAxis.TitleSize := 25;
end;
newSeries.FillSampleValues(20);
end;
I would expect to get the same result in both cases but I am not and I cannot figure out how to get the custom axis to behave the same as the Left Axis.
Any help would be appreciated.