Hi Guys,there's a big problem i have about click series event .
I use line and bar series to make a web chart,but i can't click on any series before reload the page.
I found it will trigger click background at first time and reload the page.
After reloaded,the labels of bottom axe were disappear and the click function became normal.
Is there any solution about this question?Please help me.
P.S. I use Steema TeeChart for .Net Version 2.0.2040.15119
unicom
Can't trigger click series event on webform
Can't trigger click series event on webform
Last edited by unicom on Thu Jun 22, 2006 5:18 am, edited 1 time in total.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi unicom,
I can not reproduce the issue here using an example like the List Of Features\Interacting With Charts\Mouseover Hints\Click Elements at our ASP.NET live demo and setting its bottom axis labels to a 90º angle.
Also notice that this demo project is included with TeeChart for .NET v2 installation at C:\Program Files\Steema Software\TeeChart for .NET v2\TeeChartForNET (Default english installation path). Can you reproduce the problem using this project?
If the problem persists, could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
BTW: The version you use is not the latest release available at the customer area. You could upgrade and test if latest release available works fine at your end.
I can not reproduce the issue here using an example like the List Of Features\Interacting With Charts\Mouseover Hints\Click Elements at our ASP.NET live demo and setting its bottom axis labels to a 90º angle.
Also notice that this demo project is included with TeeChart for .NET v2 installation at C:\Program Files\Steema Software\TeeChart for .NET v2\TeeChartForNET (Default english installation path). Can you reproduce the problem using this project?
If the problem persists, could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
BTW: The version you use is not the latest release available at the customer area. You could upgrade and test if latest release available works fine at your end.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi unicom,
The custom labels don’t seem to be correctly saving to a ten file. This is a defect (TF02011522) which I've added to our bug list to be fixed for future releases.
Try using the following code instead:
The custom labels don’t seem to be correctly saving to a ten file. This is a defect (TF02011522) which I've added to our bug list to be fixed for future releases.
Try using the following code instead:
Code: Select all
private Steema.TeeChart.Styles.Line Percent;
private Steema.TeeChart.Styles.Bar Qty;
private Steema.TeeChart.Styles.Points ptPercent;
private static MemoryStream tmpChart;
private Steema.TeeChart.Chart chPareto;
private static bool first = true;
protected void Page_Load(object sender, EventArgs e)
{
if (first)
{
tmpChart = new MemoryStream();
first = false;
}
chPareto = Pareto.Chart;
if (tmpChart.Length > 0)
{
tmpChart.Position = 0;
chPareto.Import.Template.Load(tmpChart);
AssociateSeries();
CorrectColors();
}
else
{
PChartSetting();
SeriesSetting();
chPareto.Export.Template.Save(tmpChart);
}
}
protected void Button1_Click1(object sender, EventArgs e)
{
AssociateSeries();
Random rnd = new Random();
for (int i = 0; i < 10; ++i)
{
ptPercent.Add(i, rnd.NextDouble(), "T e s t L a b e l s");
Percent.Add(i, rnd.NextDouble(), "T e s t L a b e l s");
Qty.Add(i, rnd.NextDouble(), "T e s t L a b e l s");
}
Percent.Pointer.Visible = true;
//this should save in the ten file but doesn't.
//for (int i = 0; i < 30; i++)
//{
// Pareto.Chart.Axes.Bottom.Labels.Items.Add(i, "T e s t L a b e l s");
//}
tmpChart.Position = 0;
chPareto.Export.Template.Save(tmpChart);
}
protected void WebChart1_ClickBackground(object sender, ImageClickEventArgs e)
{
chPareto.Export.Template.Save(tmpChart);
ShowMsgBox("Back");
}
private void PChartSetting()
{
Pareto.Chart.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Text;
Pareto.Chart.Axes.Bottom.Labels.Angle = 90;
Pareto.Chart.Axes.Bottom.Labels.Visible = true;
Pareto.Chart.Axes.Left.Title.Caption = "Time";
Pareto.Chart.Axes.Right.Title.Caption = "%";
Pareto.Chart.Axes.Right.Title.Angle = 0;
Pareto.Chart.Aspect.View3D = false;
Pareto.Chart.Header.Text = "pareto";
}
private void CorrectColors()
{
Percent.Color = System.Drawing.Color.DeepPink;
ptPercent.Color = System.Drawing.Color.DeepPink;
Qty.Color = System.Drawing.Color.BlueViolet;
}
private void AssociateSeries()
{
chPareto = Pareto.Chart;
Qty = chPareto[1] as Steema.TeeChart.Styles.Bar;
Percent = chPareto[0] as Steema.TeeChart.Styles.Line;
ptPercent = chPareto[2] as Steema.TeeChart.Styles.Points;
}
private void SeriesSetting()
{
chPareto = Pareto.Chart;
chPareto.Series.RemoveAllSeries();
chPareto.Series.Add(new Steema.TeeChart.Styles.Line());
chPareto.Series.Add(new Steema.TeeChart.Styles.Bar());
chPareto.Series.Add(new Steema.TeeChart.Styles.Points());
AssociateSeries();
CorrectColors();
Percent.Title = "%";
Qty.Title = "times";
ptPercent.ShowInLegend = false;
Percent.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right;
ptPercent.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right;
}
private void ShowMsgBox(string show)
{
Response.Write("<" + "script language='JavaScript'>" + Convert.ToChar(13));
Response.Write("alert('" + show + "')" + Convert.ToChar(13));
Response.Write("</" + "script>");
}
protected void WebChart1_ClickSeries(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, EventArgs e)
{
chPareto.Export.Template.Save(tmpChart);
ShowMsgBox("OK" + valueIndex.ToString());
}
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 |