Hi!
I am starting again with straight questions, which are still unanswered:
Is it possible to repaint the whole chart at any time of the creation (e.g. in GetAxisLabel)?
Werner
Repaint
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Werner,
Yes, this is possible, but be careful not to enter in a endless loop as AfterDraw event (self explainatory) is fired. To force a chart being drawn you can use tChart1.Invalidate(). You can also play with tChart1.Autorepaint property.
Yes, this is possible, but be careful not to enter in a endless loop as AfterDraw event (self explainatory) is fired. To force a chart being drawn you can use tChart1.Invalidate(). You can also play with tChart1.Autorepaint property.
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 |
Invalidate does not work
I tried WebChartProdukt.Chart.Invalidate(); in WebChartProdukt_GetBottomAxisDrawLabel
but with no effect.
WebChartProdukt_GetBottomAxisDrawLabel is only called once and the labels are not redrawn.
Would should the AutoRepaint value do? Could that be help in my case?
I tried searching in the Feature demo for AutoRepaint, but all I got was Realtime charting. When I start this, the feature demo freezes and I had a hard time killing it. No chance to see the source code of this.
Any other suggestions?
Werner
but with no effect.
WebChartProdukt_GetBottomAxisDrawLabel is only called once and the labels are not redrawn.
Would should the AutoRepaint value do? Could that be help in my case?
I tried searching in the Feature demo for AutoRepaint, but all I got was Realtime charting. When I start this, the feature demo freezes and I had a hard time killing it. No chance to see the source code of this.
Any other suggestions?
Werner
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Werner,
Use AutoRepaint false to disable Chart repainting whilst (for example) adding a large number of points to a Chart Series. This avoids repainting of the Chart whilst the points are added. AutoRepaint may be re-enabled, followed by a manual Repaint command when all points are added.
Example:
Use AutoRepaint false to disable Chart repainting whilst (for example) adding a large number of points to a Chart Series. This avoids repainting of the Chart whilst the points are added. AutoRepaint may be re-enabled, followed by a manual Repaint command when all points are added.
Example:
Code: Select all
tChart1.AutoRepaint = false;
Random r = new Random();
for(int i = 0; i <500; i++)
{
tChart1[0].Add (i,r.Next(800),Color.Blue);
}
tChart1.AutoRepaint = true;
tChart1.Refresh();
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 |
ASP.NET application
Hey Narcis!
Do you know that we are talking about a web application?
So refresh simple is not available...
Any other ideas?
Werner
Do you know that we are talking about a web application?
So refresh simple is not available...
Any other ideas?
Werner
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Werner,
The code below works fine in web applications. Setting AutoRepaint=true makes WebChart being internally repainted.
The code below works fine in web applications. Setting AutoRepaint=true makes WebChart being internally repainted.
Code: Select all
private void Page_Load(object sender, System.EventArgs e)
{
WebChart1.Chart.AutoRepaint=false;
Random r = new Random();
for(int i = 0; i <500; i++) WebChart1.Chart.Series[0].Add(i,r.Next(),Color.Red);
WebChart1.Chart.AutoRepaint=true;
}
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 |
If I do:
the labels in the WebChart are not repainted.
Are there other ways to repaint the labels?
Nice regards
Werner
Code: Select all
private void WebChartProdukt_GetBottomAxisDrawLabel(object sender, Steema.TeeChart.GetAxisDrawLabelEventArgs e)
{
[...]
if({Label overlaps with previous})
{
WebChartProdukt.Chart.AutoRepaint = false;
WebChartProdukt.Chart.Axes.Bottom.Labels.Angle = 90;
WebChartProdukt.Chart.AutoRepaint = true;
}
}
Are there other ways to repaint the labels?
Nice regards
Werner
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Werner,
It works fine here using GetAxisLabel event without the need of forcing the chart being repainted:
It works fine here using GetAxisLabel event without the need of forcing the chart being repainted:
Code: Select all
private void WebChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
{
if (sender==WebChart1.Chart.Axes.Bottom)
{
WebChart1.Chart.Axes.Bottom.Labels.Angle=90;
}
}
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 |