Hi ,
See the attachment - In my chart I have 3 area series and on the lest I have the values of the series.
I want to show only the dates that have value in the series.
Thanks
Dates Range on the bottom axis - properties
Re: Dates Range on the bottom axis - properties
Hello qcrnd,
Please, you could say us if you checked my previous code and what problem are you have found in it?
On the other hand, I have made other example that works fine here. Please, check next code if works as you want.
Also, I have attached an image, because you could see our results that we have obtained with previous code:
If you don't get same results, with our code or it doesn't works as you want, please modify code or explain exactly what we must do to reproduce your problem.
Thanks,
Please, you could say us if you checked my previous code and what problem are you have found in it?
On the other hand, I have made other example that works fine here. Please, check next code if works as you want.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Area area = new Steema.TeeChart.Styles.Area(tChart1.Chart);
Steema.TeeChart.Styles.Area area1 = new Steema.TeeChart.Styles.Area(tChart1.Chart);
Steema.TeeChart.Styles.Area area2 = new Steema.TeeChart.Styles.Area(tChart1.Chart);
area.XValues.DateTime = true;
area1.XValues.DateTime = true;
area2.XValues.DateTime = true;
area.Pointer.Visible = true;
area1.Pointer.Visible = true;
area2.Pointer.Visible = true;
area.AreaLines.Visible = false;
area1.AreaLines.Visible = false;
area2.AreaLines.Visible = false;
area.Pointer.Pen.Color = area.LinePen.Color;
area1.Pointer.Pen.Color = area1.LinePen.Color;
area2.Pointer.Pen.Color = area2.LinePen.Color;
area.Pointer.InflateMargins = false;
Random rnd = new Random();
for (int i = 0; i < 3; ++i)
{
if (i == 0)
{
area.Add(DateTime.Now.AddDays(i), 80, DateTime.Now.AddDays(i).ToShortDateString());
area1.Add(DateTime.Now.AddDays(i), 80, DateTime.Now.AddDays(i).ToShortDateString());
area2.Add(DateTime.Now.AddDays(i), 80, DateTime.Now.AddDays(i).ToShortDateString());
}
else if (i == 1)
{
area.Add(DateTime.Now.AddDays(i), 40, DateTime.Now.AddDays(i).ToShortDateString());
area1.Add(DateTime.Now.AddDays(i), 40, DateTime.Now.AddDays(i).ToShortDateString());
area2.Add(DateTime.Now.AddDays(i), 40, DateTime.Now.AddDays(i).ToShortDateString());
}
else if (i == 2)
{
area.Add(DateTime.Now.AddDays(i + 10), 80, DateTime.Now.AddDays(i + 10).ToShortDateString());
area1.Add(DateTime.Now.AddDays(i + 10), 80, DateTime.Now.AddDays(i + 10).ToShortDateString());
area2.Add(DateTime.Now.AddDays(i + 10), 80, DateTime.Now.AddDays(i + 10).ToShortDateString());
}
}
tChart1.Panel.MarginBottom = 20;
tChart1.Axes.Bottom.Labels.Angle = 90;
area.MultiArea = Steema.TeeChart.Styles.MultiAreas.Stacked;
}
If you don't get same results, with our code or it doesn't works as you want, please modify code or explain exactly what we must do to reproduce your problem.
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 |
Re: Dates Range on the bottom axis - properties
Hi
Your example is good and work exactly as I want.
But in my solution on my chart I got all the days between.
Do yo know what property can cause this behavior?
Thanks
Your example is good and work exactly as I want.
But in my solution on my chart I got all the days between.
Do yo know what property can cause this behavior?
Thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Dates Range on the bottom axis - properties
Hi qcrnd,
Have you tried adding axis labels directly when populating the series as Sandra did?
Have you tried adding axis labels directly when populating the series as Sandra did?
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: Dates Range on the bottom axis - properties
Hi
You are right - I missed this part .
Now it works OK:)
Thanks
You are right - I missed this part .
Now it works OK:)
Thanks