Bug in Waterfall serie?
Bug in Waterfall serie?
We have problems with the Waterfall series. Not all lines are drawn.
Please check the code below.
Dim oSerie As New Steema.TeeChart.Styles.Waterfall
oSerie.IrregularGrid = True
TChart1.Aspect.Chart3DPercent = 100
For i As Integer = 0 To 9
oSerie.Add(i, 2 + Rnd(), 1)
Next
For i As Integer = 0 To 9
oSerie.Add(2 * i, 2 + Rnd(), 2)
Next
TChart1.Series.Add(oSerie)
Please help!!
Please check the code below.
Dim oSerie As New Steema.TeeChart.Styles.Waterfall
oSerie.IrregularGrid = True
TChart1.Aspect.Chart3DPercent = 100
For i As Integer = 0 To 9
oSerie.Add(i, 2 + Rnd(), 1)
Next
For i As Integer = 0 To 9
oSerie.Add(2 * i, 2 + Rnd(), 2)
Next
TChart1.Series.Add(oSerie)
Please help!!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Janne,
This is not being plotted because your series doesn't fall in the description of those series style I made on this thread.
An alternative to achieve what you request would be using 2 series, for example:
This is not being plotted because your series doesn't fall in the description of those series style I made on this thread.
An alternative to achieve what you request would be using 2 series, for example:
Code: Select all
Dim oSerie1 As New Steema.TeeChart.Styles.Waterfall(TChart1.Chart)
Dim oSerie2 As New Steema.TeeChart.Styles.Waterfall(TChart1.Chart)
oSerie1.IrregularGrid = True
oSerie2.IrregularGrid = True
TChart1.Aspect.Chart3DPercent = 100
For i As Integer = 0 To 9
oSerie1.Add(i, 2 + Rnd(), 1)
Next
For i As Integer = 0 To 9
oSerie2.Add(2 * i, 2 + Rnd(), 2)
Next
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 |
Not possible
Hi Narcis
Unfortunately this is not possible.
This solution will have to poor performance.
In our application we will need at least 100 series with at least 400 values in each. The performance is then very bad.
Is it possible to get the functionality from our first question in some way? Customization? Bug fix release? We need it really soon.
Thanks a lot for your help!
Unfortunately this is not possible.
This solution will have to poor performance.
In our application we will need at least 100 series with at least 400 values in each. The performance is then very bad.
Is it possible to get the functionality from our first question in some way? Customization? Bug fix release? We need it really soon.
Thanks a lot for your help!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Janne,
Why do you assume that performance will be bad? All we're doing is splitting the data in half and using two series, instead of using the whole data in one. We don't think that performance would be adversly affected. Moreover, you can check that both options take almost the same time running this example:
Why do you assume that performance will be bad? All we're doing is splitting the data in half and using two series, instead of using the whole data in one. We don't think that performance would be adversly affected. Moreover, you can check that both options take almost the same time running this example:
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TChart1.Series.RemoveAllSeries()
Dim oSerie As New Steema.TeeChart.Styles.Waterfall
oSerie.IrregularGrid = True
TChart1.Aspect.Chart3DPercent = 100
For i As Integer = 0 To 9
oSerie.Add(i, 2 + Rnd(), 1)
Next
For i As Integer = 0 To 9
oSerie.Add(2 * i, 2 + Rnd(), 2)
Next
TChart1.Series.Add(oSerie)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TChart1.Series.RemoveAllSeries()
Dim oSerie1 As New Steema.TeeChart.Styles.Waterfall(TChart1.Chart)
Dim oSerie2 As New Steema.TeeChart.Styles.Waterfall(TChart1.Chart)
oSerie1.IrregularGrid = True
oSerie2.IrregularGrid = True
TChart1.Aspect.Chart3DPercent = 100
For i As Integer = 0 To 9
oSerie1.Add(i, 2 + Rnd(), 1)
Next
For i As Integer = 0 To 9
oSerie2.Add(2 * i, 2 + Rnd(), 2)
Next
End Sub
Private startTime As DateTime, now As DateTime
Private Sub TChart1_BeforeDraw(ByVal sender As System.Object, ByVal g As Steema.TeeChart.Drawing.Graphics3D) Handles TChart1.BeforeDraw
startTime = DateTime.Now
End Sub
Private Sub TChart1_AfterDraw(ByVal sender As System.Object, ByVal g As Steema.TeeChart.Drawing.Graphics3D) Handles TChart1.AfterDraw
'calculate elapsed time
now = DateTime.Now
Dim elapsedTime As TimeSpan = New TimeSpan(now.Ticks - startTime.Ticks)
Dim total As Integer = (elapsedTime.Seconds * 1000) + elapsedTime.Milliseconds
label1.Text = "Elapsed time: " + total.ToString() + " ms"
End Sub
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 |
The reason why I say that the solution will have poor performance is of course that I have tested this.
In this sample to show the problem we have we used a lot of less data.
In fact we will need 100 series with 400 values in each.
If we would be able to plot it all in one serie it takes 3.2 s of we have 100 series it crashes after 2 minutes with "An unhandled exception of type 'System.OutOfMemoryException' occurred in mscorlib.dll".
We really need the possibility to plot it in the same serie.
Is it possible to buy customization to fix this?
I have included a sample with 100 series.
'------------------------------------------------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TChart1.Series.RemoveAllSeries()
Dim oSerie As New Steema.TeeChart.Styles.Waterfall
oSerie.IrregularGrid = True
TChart1.Aspect.Chart3DPercent = 100
For j As Integer = 0 To 99
If j Mod 2 = 0 Then
For i As Integer = 0 To 399
oSerie.Add(i, 2 + Rnd(), j)
Next
Else
For i As Integer = 0 To 399
oSerie.Add(2 * i, 2 + Rnd(), j)
Next
End If
Next
TChart1.Series.Add(oSerie)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TChart1.Series.RemoveAllSeries()
For j As Integer = 0 To 99
Dim oSerie As New Steema.TeeChart.Styles.Waterfall(TChart1.Chart)
oSerie.IrregularGrid = True
TChart1.Aspect.Chart3DPercent = 100
If j Mod 2 = 0 Then
For i As Integer = 0 To 399
oSerie.Add(i, 2 + Rnd(), j)
Next
Else
For i As Integer = 0 To 399
oSerie.Add(2 * i, 2 + Rnd(), j)
Next
End If
Next
End Sub
Private startTime As DateTime, now As DateTime
Private Sub TChart1_BeforeDraw(ByVal sender As System.Object, ByVal g As Steema.TeeChart.Drawing.Graphics3D) Handles TChart1.BeforeDraw
startTime = DateTime.Now
End Sub
Private Sub TChart1_AfterDraw(ByVal sender As System.Object, ByVal g As Steema.TeeChart.Drawing.Graphics3D) Handles TChart1.AfterDraw
'calculate elapsed time
now = DateTime.Now
Dim elapsedTime As TimeSpan = New TimeSpan(now.Ticks - startTime.Ticks)
Dim total As Integer = (elapsedTime.Seconds * 1000) + elapsedTime.Milliseconds
label1.Text = "Elapsed time: " + total.ToString() + " ms"
End Sub
'---------------------------------------------------------------------
Thanks in advance!
In this sample to show the problem we have we used a lot of less data.
In fact we will need 100 series with 400 values in each.
If we would be able to plot it all in one serie it takes 3.2 s of we have 100 series it crashes after 2 minutes with "An unhandled exception of type 'System.OutOfMemoryException' occurred in mscorlib.dll".
We really need the possibility to plot it in the same serie.
Is it possible to buy customization to fix this?
I have included a sample with 100 series.
'------------------------------------------------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TChart1.Series.RemoveAllSeries()
Dim oSerie As New Steema.TeeChart.Styles.Waterfall
oSerie.IrregularGrid = True
TChart1.Aspect.Chart3DPercent = 100
For j As Integer = 0 To 99
If j Mod 2 = 0 Then
For i As Integer = 0 To 399
oSerie.Add(i, 2 + Rnd(), j)
Next
Else
For i As Integer = 0 To 399
oSerie.Add(2 * i, 2 + Rnd(), j)
Next
End If
Next
TChart1.Series.Add(oSerie)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TChart1.Series.RemoveAllSeries()
For j As Integer = 0 To 99
Dim oSerie As New Steema.TeeChart.Styles.Waterfall(TChart1.Chart)
oSerie.IrregularGrid = True
TChart1.Aspect.Chart3DPercent = 100
If j Mod 2 = 0 Then
For i As Integer = 0 To 399
oSerie.Add(i, 2 + Rnd(), j)
Next
Else
For i As Integer = 0 To 399
oSerie.Add(2 * i, 2 + Rnd(), j)
Next
End If
Next
End Sub
Private startTime As DateTime, now As DateTime
Private Sub TChart1_BeforeDraw(ByVal sender As System.Object, ByVal g As Steema.TeeChart.Drawing.Graphics3D) Handles TChart1.BeforeDraw
startTime = DateTime.Now
End Sub
Private Sub TChart1_AfterDraw(ByVal sender As System.Object, ByVal g As Steema.TeeChart.Drawing.Graphics3D) Handles TChart1.AfterDraw
'calculate elapsed time
now = DateTime.Now
Dim elapsedTime As TimeSpan = New TimeSpan(now.Ticks - startTime.Ticks)
Dim total As Integer = (elapsedTime.Seconds * 1000) + elapsedTime.Milliseconds
label1.Text = "Elapsed time: " + total.ToString() + " ms"
End Sub
'---------------------------------------------------------------------
Thanks in advance!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Janne,
Thanks for the information. In your example you wouldn't need to use so many series, only using 2 works fine here (using code below) and is quicker than using Button1's code.
Can you please try if the code snippet above works fine for you?
Thanks in advance.
Thanks for the information. In your example you wouldn't need to use so many series, only using 2 works fine here (using code below) and is quicker than using Button1's code.
Code: Select all
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TChart1.Series.RemoveAllSeries()
TChart1.Aspect.Chart3DPercent = 100
Dim oSerie1 As New Steema.TeeChart.Styles.Waterfall(TChart1.Chart)
Dim oSerie2 As New Steema.TeeChart.Styles.Waterfall(TChart1.Chart)
'oSerie1.IrregularGrid = True
'oSerie2.IrregularGrid = True
For j As Integer = 0 To 99
If j Mod 2 = 0 Then
For i As Integer = 0 To 399
oSerie1.Add(i, 2 + Rnd(), j)
Next
Else
For i As Integer = 0 To 399
oSerie2.Add(2 * i, 2 + Rnd(), j)
Next
End If
Next
End Sub
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 |
Hi Narcis,
This will not work for my application.
The samples I have sent you are much simplier than what we need.
Let's say you have date on the z axis, the plot contains of 100 different dates. Each date has 400 values plotted x and y. The maximum x value of each date varies but it is even spaces for one date.
Belive me, I really need 100 series if it should be solved with your suggestion. My question still remains can this be solved in a bug fix release or can we buy a customization?
Otherwise we need to consider using a different control.
Really need a answer.
Thanks for your help!
This will not work for my application.
The samples I have sent you are much simplier than what we need.
Let's say you have date on the z axis, the plot contains of 100 different dates. Each date has 400 values plotted x and y. The maximum x value of each date varies but it is even spaces for one date.
Belive me, I really need 100 series if it should be solved with your suggestion. My question still remains can this be solved in a bug fix release or can we buy a customization?
Otherwise we need to consider using a different control.
Really need a answer.
Thanks for your help!
Please help
Could anyone try to answer my question?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Janne,
We are investigating possibilities. For the data density you are charting, have you considered using a Tower Series? One Series may be used to plot all of the data points.
We are investigating possibilities. For the data density you are charting, have you considered using a Tower Series? One Series may be used to plot all of the data points.
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 Janne,
Our suggestion to achieve what you request is doing like in the example below. If you want to use 100x400 series we think there's to much data in the chart for being interpretable. Our suggestion, if possible, would be to use smaller datasets.
Our suggestion to achieve what you request is doing like in the example below. If you want to use 100x400 series we think there's to much data in the chart for being interpretable. Our suggestion, if possible, would be to use smaller datasets.
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
double[] dataX = new double[800];
double[] dataY = new double[800];
double[] dataZ = new double[800];
Random rnd = new Random();
tChart1.Series.RemoveAllSeries();
Steema.TeeChart.Styles.Waterfall oSerie = new Steema.TeeChart.Styles.Waterfall();
oSerie.Pen.Visible = false;
oSerie.WaterLines.Visible = false;
oSerie.IrregularGrid = true;
tChart1.Aspect.Chart3DPercent = 100;
tChart1.Axes.Depth.Visible = true;
int counter = 0;
for (int j = 0; j < 10; j++)
{
if (j % 2 == 0)
{
int loop = counter;
for (int i = 0; i < 40; i++)
{
dataX[i + loop] = i;
dataY[i + loop] = 2 + rnd.Next();
dataZ[i + loop] = j;
int plus = 40;
dataX[i + plus + loop] = i+40;
dataY[i + plus + loop] = 0;
dataZ[i + plus + loop] = j;
counter++;
counter++;
}
}
else
{
int loop = counter;
for (int i = 0; i < 40; i++)
{
double val = 2 + rnd.Next();
dataX[i + loop] = 2 * i;
dataY[i + loop] = val;
dataZ[i + loop] = j;
int plus = 40;
dataX[i + plus + loop] = (2 * i)-1;
dataY[i + plus + loop] = val;
dataZ[i + plus + loop] = j;
counter++;
counter++;
}
}
}
oSerie.Add(dataX,dataY,dataZ);
tChart1.Series.Add(oSerie);
}
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:
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 |
Hi Narcis,
I have uploaded one file containing the data that is shown incorrectly and a jpg of the screen. I have also included a jpeg of a sample where all graphs are ending with the same x value and the same number of values and it shows nicely.
If it can't be solved without modifications we are prepared to pay for some development.
Thanks in advance!
I have uploaded one file containing the data that is shown incorrectly and a jpg of the screen. I have also included a jpeg of a sample where all graphs are ending with the same x value and the same number of values and it shows nicely.
If it can't be solved without modifications we are prepared to pay for some development.
Thanks in advance!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Janne,
I've sent you an e-mail with the plot we obtained from your data. If you wish the regions that are empty on the Chart to be plotted then you need to rationalise the data, setting a value at each x,z location, even if that value is zero.
Code used to add the data as follows after converting the dataset to a text file format:
I've sent you an e-mail with the plot we obtained from your data. If you wish the regions that are empty on the Chart to be plotted then you need to rationalise the data, setting a value at each x,z location, even if that value is zero.
Code used to add the data as follows after converting the dataset to a text file format:
Code: Select all
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim ts As New Steema.TeeChart.Data.TextSource("chart1.txt")
TChart1.Aspect.View3D = True
ts.HeaderLines = 1
ts.Separator = vbTab
ts.Fields.Add(0, "X")
ts.Fields.Add(1, "Y")
ts.Fields.Add(2, "Z")
Dim waterfall1 = New Steema.TeeChart.Styles.Waterfall(TChart1.Chart)
waterfall1.DataSource = ts
End Sub
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 |