Hi
I'd like to use a custom axis instead of the default bottom axis but when I do it, it seems that the label of this axis has no size.
The height of the graph increases so the label goes outside of the component.
Here is a screenshot wich comes from the TeeChart demo.
When I set the bottom axis visibility to false, the yellow axis label is outside of the component space.
Is it a bug or am I doing something wrong ?
Thanks
Nico
Problem with Custom Axis
Hi Nico,
it's not a bug. Custom axes don't support the LabelsSize. The workaround is to manually readjust ChartRect before you draw chart elements. I think the best place where you can do this is in TChart OnBeforeDrawChart event:
it's not a bug. Custom axes don't support the LabelsSize. The workaround is to manually readjust ChartRect before you draw chart elements. I think the best place where you can do this is in TChart OnBeforeDrawChart event:
Code: Select all
procedure TForm1.Chart1BeforeDrawChart(Sender: TObject);
begin
TCustomChart(Sender).ChartRect.Bottom := TCustomChart(Sender).ChartRect.Bottom- 30; { add extra space on bottom edge }
end;
Pep Jorge
http://support.steema.com
http://support.steema.com