Is it possible to implement two types of labels for one chart axis like on image bellow(red rectangle)?
I need two axis labels, one for longer period and second for shorter period.
If image didn't appear:
http://piccy.info/view/c1fbbd7a689b18b5 ... 1cc7e0442/
I use the TeeChart 3.5.
Is it possible to make chart axis like on image?
Hi petro,
The axes weren't thought to be drawn like you want but you could try using top axis to display one labels and bottom axis to display the others:
The axes weren't thought to be drawn like you want but you could try using top axis to display one labels and bottom axis to display the others:
Code: Select all
private void InitializeChart()
{
chartController1.Chart = tChart1;
tChart1.Aspect.View3D = false;
Error error1 = new Error(tChart1.Chart);
Random rnd = new Random();
error1.XValues.DateTime = true;
for (int i = 0; i < 50; i++)
{
error1.Add(DateTime.Now.AddDays(i).ToOADate(), rnd.Next(10)+ 25, rnd.Next(5)+20);
}
error1.HorizAxis = HorizontalAxis.Both;
tChart1.Axes.Bottom.Labels.DateTimeFormat = "dd";
tChart1.Axes.Bottom.Ticks.Length = 5;
tChart1.Axes.Bottom.TickOnLabelsOnly = true;
tChart1.Axes.Bottom.MinorTicks.Visible = false;
tChart1.Axes.Top.Labels.DateTimeFormat = "MMMM";
tChart1.Axes.Top.Ticks.Length = 30;
tChart1.Axes.Top.OtherSide = false;
tChart1.Axes.Top.TickOnLabelsOnly = true;
tChart1.Axes.Top.MinorTicks.Visible = false;
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Here note that you won't be able to assign more than one axis as horizontal axis for the same series. Only with the default top and bottom axis it is possible with:petro wrote:I'll experiment with CustomAxis, so I think I can get appropriate result.
Code: Select all
error1.HorizAxis = HorizontalAxis.Both;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |