Page 1 of 1
How to draw chart with variable values vs time.
Posted: Fri Oct 04, 2013 11:16 am
by 13049533
Hi,
I am trying to plot chart using TeeChart, I am getting data from the hardware board via serial connection to the PC. I am designing GUI in c#. I am storing those values in different variables. I am getting real time data so i will get data from hardware every 2 sec.
I would like to plot chart between those values stored in variable Vs Time.now. I am trying to update chart with every 2 sec so X-axis time and Y-axis variable value.
which is the best way to draw series in TeeChart? Can any one give me some example?
Re: How to draw chart with variable values vs time.
Posted: Fri Oct 04, 2013 3:42 pm
by 10050769
Hello bijit,
I recommend you taking a look, in the demo project of TeeChartFor.Net, concretely All Features\Axis examples and in Tutorial 4 - Axis Control.
If you have more problems please let me know.
Thanks,
Re: How to draw chart with variable values vs time.
Posted: Thu Oct 10, 2013 11:13 am
by 13049533
Hi sandra,
I have a problem with TeeChart. I working with GUI design using C#. I am updating chart with real time data. I have different sensor values and i am using three methods to raise event to update chart whenever it has new value(almost every 2sec). I am creating a DATATABLE (datagrid) for each sensor and giving that as data source to the chart.
I am able to update all sensors in the chart and its working nicely but after some time the GUI becoming very slow and not responding(after 1 hour). I thought it has very less memory and i had changed system configuration but after that i have increased memory and 4GB ram but still i have same problem.
Then i tried without saving the values in table and tried with list. Now i got little bit improved performance (3 hours) but still user interface becoming very slow and not responding as it should. I observed that when i keep display Chart TAB open in my GUI then it is once again responding very slow after 1 hour and stops responding, if i don't keep display chart tab and keep display another tab open in GUI then it is responding little bit more time and updating chart in the chart tab as usual.
I mean when i start update chart and keep chart tab visible then it becomes very slow and stops working.
I have tried with arrays also but i have same problem. I din't understand why my GUI is responding like that with chart. If i don't start update chart then my GUI is receiving and showing values continuously around days.
Can you please suggest some idea?
Thanks in advance.
Biji
Re: How to draw chart with variable values vs time.
Posted: Thu Oct 10, 2013 12:10 pm
by 10050769
Hello Bijit,
To try to solve your problem, we need reproduce it. For this reason I would be very grateful if you can arrange a simple project where the problem appears and we can run as-is here, because we can try to suggest you a good solution for it.
Thanks,
Re: How to draw chart with variable values vs time.
Posted: Fri Oct 11, 2013 8:06 am
by 13049533
Hi sandra,
I am working with real time data logging and updating table, chart.Without connecting to hardware then you don't see anything. I am wondering how could i sent some part of project! Do you need only chart update part or the total project?
Thanks.
Re: How to draw chart with variable values vs time.
Posted: Fri Oct 11, 2013 8:34 am
by narcis
Hi biji,
Please try creating a simple example project using a dataset created at run-time, as in the example in
this thread.
Thanks in advance.
Re: How to draw chart with variable values vs time.
Posted: Mon Oct 14, 2013 3:00 pm
by 13049533
Hi,
I have created simple example project to understand how i am creating a data-table and how i am updating TeeChart from that source. The code for chart update and creating datatable was written in Log.cs.
How it is initializing chart line for each sensor as shown in sensor1.cs. I have like that for all sensors. I have used only few sensors here in this example.
Please find the attached zip file.
If it is not enough then please let me know what else i can provide.
You need to add TeeChart.dll file, because when i add and convert to zip file, the file size is exceeding 512kb so i can't upload the file. so just i removed it and uploaded. if you want to see teechart in my design you need to place that file in debug folder. I have licence for Teechart.Net v3.
Thanks in advance,
biji.
Re: How to draw chart with variable values vs time.
Posted: Tue Oct 15, 2013 9:43 am
by 10050769
Hello biji,
Thanks for your project. But, I can not run it, because when I compile the project it throw many Error. Could you send a correct project that we can run here?
On the other hand, in latest version of TeeChart.Net we have improved performance, for this reason, I recommend you check, using latest eval version of TeeChartFor.Net that you can download
here, if your performance improves and your problem disappears.