Page 1 of 1
Issue with Large amount of data in TeeChart
Posted: Wed Sep 20, 2006 2:41 pm
by 9527393
Hello,
I have an issue with TeeChart where if I send a large Datatable (with 2500 to 15,000 rows of data). The table seems to end in the middle.
To clarify, the line graph will suddenly drop to 0 in the middle fo the graph and the rest of the graph will be blank.
The Charts were put inside a Snippet.
I have 2 images in my computer, how do i post pictures?
Thanks
Posted: Wed Sep 20, 2006 3:00 pm
by narcis
Hi Areef,
It works fine here using the latest TeeChart for .NET v2 Debug Build available at the client area and the code below. Which TeeChart version are you using? Could you please modify my code so that we can reproduce the issue here?
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
CreateTable();
LoadData();
}
DataTable sourceTable;
DataColumn colY, colX, colLabels;
private void CreateTable()
{
Random r = new Random(255);
// Create DataTable
sourceTable = new DataTable("sourceTable");
colY = new DataColumn("YValues", Type.GetType("System.Double"));
colX = new DataColumn("XValues", Type.GetType("System.Double"));
colLabels = new DataColumn("Labels", Type.GetType("System.String"));
sourceTable.Columns.Add(colY);
sourceTable.Columns.Add(colX);
sourceTable.Columns.Add(colLabels);
// Add table items.
DataRow NewRow;
for (int i = 0; i < 15000; i++)
{
NewRow = sourceTable.NewRow();
NewRow["YValues"] = r.Next();
NewRow["XValues"] = i;
NewRow["Labels"] = "";
sourceTable.Rows.Add(NewRow);
}
}
private void LoadData()
{
line1.Clear();
line1.DataSource = sourceTable;
line1.YValues.DataMember = "YValues";
line1.XValues.DataMember = "XValues";
line1.LabelMember = "Labels";
line1.CheckDataSource();
}
Thanks in advance.
Posted: Wed Sep 20, 2006 7:21 pm
by 9527393
Thank you for the reply, the way that we have create our chart is not using CheckDataSource() method,
We use
TeeChart.tc.Series(k).AddXY(xDVal, yDVal, xVal.ToString(), (uint)PenColor[k]);
Ccould you please tell me what this line of code does.(I am just picking up the code) Thanks.
TeeChart.tc.Series(0).VerticalAxis= TeeChart.EVerticalAxis.aBothVertAxis;
I can only imagine its something to do with the Vertical Axis.
I am also getting a "Catastrophic failure" exception
at TeeChart.IPNGExport.SaveToStream()
Could you just breifly explain what those are
Thanks and Regards,
Areef
Posted: Thu Sep 21, 2006 8:17 am
by narcis
Hi Areef,
Could you please send us an example we can run "as-is" to reproduce both problems here? You can post your files at news://
www.steema.net/steema.public.attachments newsgroup.
Ccould you please tell me what this line of code does.(I am just picking up the code) Thanks.
TeeChart.tc.Series(0).VerticalAxis= TeeChart.EVerticalAxis.aBothVertAxis;
I can only imagine its something to do with the Vertical Axis.
This code assigns both default vertical axes (left and top) as vertical axes for this series.