I have a horizontal bar series with two-line labels in the axis--but if there is too much data, then the labels can get dropped. (Se
Two questions:
1) What setting is the margin between the labels? It seems a bit to aggressive here.
2) Is there a way of knowing if any of the labels are dropped? If they are, I want to change the value to a mark.
Thank you,
Ed Dressel
Horz labels dropping
Horz labels dropping
Ed Dressel
President
RetireReady Solutions
President
RetireReady Solutions
Re: Horz labels dropping
Hello Ed,
Re.1.
You can manually override the auto-separation with the increment property.
eg. (you'll notice the effect of this test more on a horizontal axis but the result is the same on a vertical axis where you have multiline labels):
Re 2.
TeeChart takes the length of the longest label (multiline height in this case) and calculates what spacing would be required for the fit. Default is the value 10%. You'd need to run the calculation prior to the Chart doing so, to know what fit is likely.
The chart starts here:
and CalcLabelsIncrement goes on to check depending on datetimeformat, log-scale, etc.
Regards,
Marc
Re.1.
You can manually override the auto-separation with the increment property.
eg. (you'll notice the effect of this test more on a horizontal axis but the result is the same on a vertical axis where you have multiline labels):
Code: Select all
Series1.Add(4,'first long long label');
Series1.Add(5,'second long long label');
Series1.Add(3,'third long long label');
Series1.Add(3.5,'fourth long long label');
Chart1.Axes.Bottom.LabelsSeparation := 0;
TeeChart takes the length of the longest label (multiline height in this case) and calculates what spacing would be required for the fit. Default is the value 10%. You'd need to run the calculation prior to the Chart doing so, to know what fit is likely.
The chart starts here:
Code: Select all
Function TChartAxis.CalcXYIncrement(MaxLabelSize:Integer):TAxisValue;
var tmp : Integer;
begin
if (MaxLabelSize>0) and (IAxisSize>0) then
begin
if FLabels.Separation>0 then
Inc(MaxLabelSize,Round(0.01*FLabels.Separation*MaxLabelSize));
tmp:=Round((1.0*IAxisSize)/MaxLabelSize)
end
else tmp:=1;
result:=CalcLabelsIncrement(tmp)
end;
Regards,
Marc
Steema Support