Hi
We have used teeChart for .netv3 for displaying graphs. The X-axis is the date time value.
The user can customized the scale of date time to any values in hours.
With our current implementation, for any value less than 11hrs, the graph is distorted and the values in timecsale are repeated.
[It even happend on zomming in feature]
We are using teeChart.Chart.Axes.Bottom.SetMinMax(minDateTime, maxDateTime);
it works fine if the difference between max and min is greater than 11hrs.
Any help would be appreciated.
Thanks
Repeated dates shown when time scale is set to less than 11
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Repeated dates shown when time scale is set to less than 11
Hi san,
You probably need to set the bottom axis Increment property to the desired value as explained in tutorial 4, available at TeeChart's program group. If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here.
Thanks in advance.
You probably need to set the bottom axis Increment property to the desired value as explained in tutorial 4, available at TeeChart's program group. If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here.
Thanks in advance.
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 |
Re: Repeated dates shown when time scale is set to less than 11
Hi Narcis,
Thanks for your help. It works fine now. But the only problem we are facing is suppose the difference between the max and min date is 1 hour or 2 hour, we want to display the time in this fashion : 1:00,1:10,1:20,1:30............... 2:00. Minutes also should be displayed if the difference between min and max is less than 6 hours. Is there any property from which we can display the minutes also. Currently it is displaying only the rounded time. For example if we give difference = 1 hour. It is displaying only 2 times(example : 1:00 2:00). But we want to display the time in the fashion 1:00,1:10,1:20,1:30............... 2:00.
Thanks in Advance,
BR
San
Thanks for your help. It works fine now. But the only problem we are facing is suppose the difference between the max and min date is 1 hour or 2 hour, we want to display the time in this fashion : 1:00,1:10,1:20,1:30............... 2:00. Minutes also should be displayed if the difference between min and max is less than 6 hours. Is there any property from which we can display the minutes also. Currently it is displaying only the rounded time. For example if we give difference = 1 hour. It is displaying only 2 times(example : 1:00 2:00). But we want to display the time in the fashion 1:00,1:10,1:20,1:30............... 2:00.
Thanks in Advance,
BR
San
Re: Repeated dates shown when time scale is set to less than 11
Hello San,
I recomend you, use increment Steema.TeeChart.Utils.GetDateTimeStep to the axes and the DateTimeFormat to define how you want your DateTime format. You can do something as next:
Can you please, tell us if previous code works as you want?
I hope will helps.
Thanks,
I recomend you, use increment Steema.TeeChart.Utils.GetDateTimeStep to the axes and the DateTimeFormat to define how you want your DateTime format. You can do something as next:
Code: Select all
private void InitializeChart()
{
Steema.TeeChart.Styles.Line line1 = new Line(tChart1.Chart);
tChart1.Aspect.View3D = false;
Random rnd = new Random();
DateTime hour = new DateTime(2011,11,23,1,0,0);
TimeSpan minutes = TimeSpan.FromMinutes(10);
line1.XValues.DateTime = true;
line1.DateTimeFormat = "hh:mm";
//DateTime hour = new DateTime(0);
for (int i = 0; i < 7; ++i)
{
line1.Add(hour, rnd.Next(100));
hour += minutes;
}
tChart1.Axes.Bottom.Labels.DateTimeFormat = "hh:mm";
tChart1.Axes.Bottom.Increment = Steema.TeeChart.Utils.GetDateTimeStep(Steema.TeeChart.DateTimeSteps.TenMinutes);
}
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |