Bottom subaxis manual text is not added

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
park si won
Newbie
Newbie
Posts: 9
Joined: Fri Oct 22, 2021 12:00 am

Bottom subaxis manual text is not added

Post by park si won » Thu Sep 05, 2024 9:22 am

Only the first sublaxis will be added and the rest will not work.
Is it possible to add subaxis label in Text rather than Datetime?
My environment is .net8 and wpf.

var line = new Steema.TeeChart.Styles.Line(Chart1.Chart);
Chart1.Axes.Bottom.Increment = 3;
var rnd = new Random();
for (var i = 0; i < 50; i++)
{
line.Add(i, rnd.Next(1000), i.ToString());

}
line.Pointer.Visible = true;
line.Pointer.VertSize = 2;
line.Pointer.HorizSize = 2;

var axis = Chart1.Axes.Bottom.SubAxes.Add();
axis.Visible = true;
axis.Grid.Visible = true;
axis.Increment = 1;
for (var i = 0; i < 50; i++)
{

axis.Labels.Items.Add(i, i.ToString() +"_Sub");

}
axis.Grid.DrawEvery = 1;
axis.Labels.Angle = 90;

axis.Grid.Color = System.Drawing.Color.Red;

Edu
Newbie
Newbie
Posts: 39
Joined: Tue Nov 28, 2023 12:00 am

Re: Bottom subaxis manual text is not added

Post by Edu » Thu Sep 05, 2024 3:33 pm

Hello,

Adding these lines, your code should work.

Code: Select all

 
axis.Maximum = 50;
axis.AutomaticMaximum = false;
 
You can learn more about other options for axes, such as custom axes and axis copy here: https://steema.com/docs/teechart/net/tu ... ntrol.htm

If there's anything else, let me know!
Best regards,
Edu
Edu
Steema Support

park si won
Newbie
Newbie
Posts: 9
Joined: Fri Oct 22, 2021 12:00 am

Re: Bottom subaxis manual text is not added

Post by park si won » Fri Sep 06, 2024 1:59 am

I modified the code, but only the first one is the same, and the rest don't exist.

Edu
Newbie
Newbie
Posts: 39
Joined: Tue Nov 28, 2023 12:00 am

Re: Bottom subaxis manual text is not added

Post by Edu » Fri Sep 06, 2024 6:26 am

Hello,

I am reviewing this issue you're experiencing and want to make sure everything is up to date on your end. Could you verify if you're using our latest version? My tests are working fine on my end, so I just want to make sure we're on the same page.

Regards,
Edu
Edu
Steema Support

Post Reply