TeeChart change distance between axis title and axis DELPHI XE3 - delphi

I have chart where at the bottom axis dates are shown. The date string I have splitted into two lines. In the first is the date and in the second is the time. My problem is now, that the labels and the axis title are overlapping -> see image:
I googled for a while but found no solution or option I can use to set the distance between the axis title and the axis. The property
TChart.MarginBottom only changes the margin between the plotting area and component border. I have tried different properties to set the title vertical position:
// chtData is of type TChart
chtData.BottomAxis.Title.VertTextAlign := TVertTextAlign.vtaBottom; // Did not change anything
chtData.BottomAxis.Title.Margins.Top := 20; // Did not change anything
Is there any property I do not see?
Thank in advance for your help!

It seems there is no automatic calculation of labels' height
Seattle TChart:
in Obj. Inspector: BottomAxis - Labels - LabelSize set value 32
in chart editor: Axis - BottomAxis - Labels - Style - Size
in code: Chart.BottomAxis.LabelsSize := 2 * UsualValue

Related

Delphi - How to calculate the border-width of a SpeedButton

How can I calculate the exact width of the border of a TSpeedButton?
Depending on the values of the Flat and Down properties it seems to have a different width and a text starts at a different pixel. (with Margin <> -1 and no glyph set)
Delphi 10.2.3

How to fix TChart Axis Margin Delphi

I was a dynamic data, and I want to show it on the same TChart. How can I fix the axis margin with different data?
For Example:
First Data Have a 'thousand' value
Second Data Have a 'hundred' value
I want my TChart have same margin for any value. Thanks in advance
I think you can set it by forcing the label width to a given value.
TChart1.Axis.Left.Labels.Size := 30;
So that it always stay at the same width.
With the interface it's here

TeeChart Left Axis Label MisAligned

How can you get the vertical (left or right) axis label to align with the major tick mark when the label angle is 90 or 270?
You can set it in the chart editor under Chart|Axis|Left (or Right|Labels|Options - Position: set to "After Tick". And this would be great if the property change was saved. However, it is not.
I could do this in code if I knew what the property name was and the property attributes were.
This is TChartAxis.Texts.Position of TAxisLabelsPosition type, for example:
Chart1.Axes.Left.Texts.Position:=lpAtTick;

Teechart Legend Style

In My Code there is requirement when user click on a Bar of a series the CheckBox Style of the Series should be changed to none.But when i do that my Chart Width is increasing. IS there any way we can keep the chart width fix irrespective of legend table width.
Thanks
Akshay
This Can be done
GetLegend().SetResizeChart(false);
GetLegend().SetCustomPosition(true);
GetLegend().SetPositionUnits(muPercent);
GetLegend().SetLeftPercent(83);
GetLegend().SetTopPercent(10);
Set your legend Alignment in bottom for Avoiding width increment of chart as below.
Chart.GetLegend().SetAlignment(laBottom);
if you want custom position of legend (Right side of chart)then you can do as below.
m_Chart1.GetLegend().SetCustomPosition(TRUE);
m_Chart1.GetLegend().SetPositionUnits(muPercent);
m_Chart1.GetLegend().SetTopPercent(20);
long leftmargin = 80.0;
m_Chart1.GetLegend().SetLeftPercent(leftmargin );
m_Chart1.GetPanel().SetMarginRight(100-leftmargin+1);//for avoiding overlapping of legend and chart
Also you can finetune your legend and chart by modifying above value

Highstock control: decrease y space between series

How can I decrease space between series on a Highstock control? See attached image:
You are using this example: http://www.highcharts.com/stock/demo/candlestick-and-volume - just set proper values for height and top for y-axes

Resources