Hi,
We are using TeeChart for .NET Ver 3.5 in our application. We have the feature requirement which requires plotting of about 500000 data points in horizontal line. I have successfully tried this with FastLine series and it works. But it takes very long time plotting this much data points in horizontal line series.
My question is, can TeeChart horizontal line series handle half a million (or maybe more) data points effectively? Please guide me whether its possible with TeeChart or not.
Nitin
Horizontal Line - Large Number of data points
Re: Horizontal Line - Large Number of data points
Hi Nitin,
Please take a look at the Real-time Charting article here where some tips for improving the performance are explained.
Please take a look at the Real-time Charting article here where some tips for improving the performance are explained.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Horizontal Line - Large Number of data points
Hi Yeray,
Thanks for the reply. I have already gone through the article and as I said, it works with FastLine series. But fast line series is vertical line series, where my requirement is to plot data in Horizontal Line Series. How can I speed up horizontal line series.
Thanks for the reply. I have already gone through the article and as I said, it works with FastLine series. But fast line series is vertical line series, where my requirement is to plot data in Horizontal Line Series. How can I speed up horizontal line series.
Re: Horizontal Line - Large Number of data points
Hi Nitin,
Have you tried using a FastLine series to draw the Horizontal line? If yes, what problems did you found?
Please, take a look at the following example where the same line is drawn using an HorizLine and a FasLine:
Have you tried using a FastLine series to draw the Horizontal line? If yes, what problems did you found?
Please, take a look at the following example where the same line is drawn using an HorizLine and a FasLine:
Code: Select all
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitializeChart();
}
int nSamples;
int[] XVal;
int[] YVal;
private void InitializeChart()
{
nSamples = 500000;
XVal = new int[nSamples];
YVal = new int[nSamples];
Random rnd = new Random();
XVal[0] = 0;
YVal[0] = rnd.Next(100);
for (int i = 1; i < nSamples; i++)
{
XVal[i] = i;
YVal[i] = YVal[i - 1] + rnd.Next(10) - 5;
}
CreateAndFillSeries();
}
private void CreateAndFillSeries()
{
if (tChart1.Series.Count > 0)
if (tChart1[0] is Steema.TeeChart.Styles.FastLine) HorizLine();
else FastLine();
else FastLine();
}
private void FastLine()
{
tChart1.Clear();
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
tChart1.Header.Text = "FastLine";
Steema.TeeChart.Styles.FastLine fastLine1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
fastLine1.Add(YVal, XVal);
}
private void HorizLine()
{
tChart1.Clear();
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
tChart1.Header.Text = "HorizLine";
Steema.TeeChart.Styles.HorizLine horizLine1 = new Steema.TeeChart.Styles.HorizLine(tChart1.Chart);
horizLine1.Add(YVal, XVal);
}
private void button1_Click(object sender, EventArgs e)
{
CreateAndFillSeries();
}
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Horizontal Line - Large Number of data points
Hi Yeray,
Thanks for the code. I didn't know this thing. It works and takes only a second to plot the data.
Thank you very much.
Nitin
Thanks for the code. I didn't know this thing. It works and takes only a second to plot the data.
Thank you very much.
Nitin
Re: Horizontal Line - Large Number of data points
Hi Nitin,
I'm pleased to have been helpful!
I'm pleased to have been helpful!
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |