X axis is date data. Y is numeric data of tank level readings.
Axis readingAxisH = new Axis(true, false, lineChart);
readingAxisH.StartPosition = 0;
readingAxisH.EndPosition = 95
readingAxisH.Labels.DateTimeFormat = "h:mtt";
readingAxisH.Labels.MultiLine = true;
readingAxisH.Labels.Angle = 60;
lineChart.Axes.Custom.Add(readingAxisH);
My bottom axis still says 1/26/2009 instead of 8:23PM and it isn't at an angle.
What gives?
DateTimeFormat doesn't work on custom axes
-
- Newbie
- Posts: 16
- Joined: Fri Apr 16, 2004 4:00 am
- Location: Chicago
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Brian,
This is because you need to assign the custom axis to a series, for example:
This is because you need to assign the custom axis to a series, for example:
Code: Select all
Steema.TeeChart.Axis readingAxisH = new Steema.TeeChart.Axis(true, false, tChart1.Chart);
readingAxisH.StartPosition = 0;
readingAxisH.EndPosition = 95;
readingAxisH.Labels.DateTimeFormat = "h:mtt";
readingAxisH.Labels.MultiLine = true;
readingAxisH.Labels.Angle = 60;
tChart1.Axes.Custom.Add(readingAxisH);
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.XValues.DateTime = true;
line1.FillSampleValues();
line1.CustomHorizAxis = readingAxisH;
tChart1.Panel.MarginBottom = 20;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |