Page 1 of 1
custom axes items
Posted: Wed Oct 22, 2014 6:34 am
by 15670445
Hi,
In delphi I have with gtrea success been using this code:
Code: Select all
Chart1.CustomAxes.Items[0].Items.Add(0,'PO Nummer');
However, when trying to translate this into .NET I haven been able to find the same method. What is the equivalent method to the code above?
Re: custom axes items
Posted: Thu Oct 23, 2014 8:36 am
by Christopher
Hello,
With TeeChart.VCL you can do:
Code: Select all
procedure TForm1.InitializeChart;
var axis : TChartAxis;
begin
Series1:=TLineSeries.Create(Self);
Series1.ParentChart:=Chart1;
Series1.FillSampleValues();
axis:=Chart1.CustomAxes.Add;
axis.Horizontal:=true;
Series1.HorizAxis := aCustomHorizAxis;
Series1.CustomHorizAxis := axis;
Chart1.MarginBottom:=20;
Chart1.CustomAxes.Items[0].Items.Add(0,'PO Nummer');
end;
in TeeChart.NET the equivalent is:
Code: Select all
private void InitializeChart()
{
series1 = new Line(tChart1.Chart);
series1.FillSampleValues();
Axis axis;
tChart1.Axes.Custom.Add(axis = new Axis());
axis.Horizontal = true;
series1.HorizAxis = HorizontalAxis.Custom;
series1.CustomHorizAxis = axis;
tChart1.Panel.MarginBottom = 20;
tChart1.Axes.Custom[0].Labels.Items.Add(0, "PO Nummer");
}