Page 1 of 1

Bottom subaxis manual text is not added

Posted: Thu Sep 05, 2024 9:22 am
by 16092152
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;

Re: Bottom subaxis manual text is not added

Posted: Thu Sep 05, 2024 3:33 pm
by edu
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

Re: Bottom subaxis manual text is not added

Posted: Fri Sep 06, 2024 1:59 am
by 16092152
I modified the code, but only the first one is the same, and the rest don't exist.

Re: Bottom subaxis manual text is not added

Posted: Fri Sep 06, 2024 6:26 am
by edu
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