 |
|
 |
Hi,
I appreciate a lot your component. Is it possible to reset data? I mean I stop data collecting and so I restart but before I need to have empy chart.
Thanks
|
|
|
|
 |
|
 |
exe file is working . But ChartTrialProgram.sln is not working . It say "can not be start class librarry"
How can I do?
|
|
|
|
 |
|
 |
Hello there .. You are starting a library project .. In solution tree it may contain more than one project so just perform a right click on that project and choose 'Set as startup project' Now simply hit 'Ctrl + F5' to start the project .! Regards ..
|
|
|
|
 |
|
 |
Thank you for up-loading the source code.
I will report because there is an anxious matter.
a error occurred when the following programs were executed by using ChartControl.dll.
The following error messages come out when data is continuously input with timer (interval=100ms).
Content of error->/*An unhandled exception of type 'System.IndexOutOfRangeException' occurred in ChartControl.dll
Additional information: Index was outside the bounds of the array.*/
My best regards ..whether you could confirm it...
|
|
|
|
 |
|
 |
Hey,
I haven't touched this code in a while, but if you provide me the exact things you are doing that cause this exception i'll give it a shot
Roy.
|
|
|
|
 |
|
 |
Is Web version of this code also available. please provide if anyone have some thing related to web
Thanks,
|
|
|
|
 |
|
 |
Give me a pie of code, thanks
|
|
|
|
 |
|
 |
Hello Mr. Roy,
I've tried your application, and it works! But, I have some problem :
1. The Problem is same like as "jamezun", maximum value of Y axis only 40. How to set it more than 40 ?
2. My application to record the Y movement of mouse pointer per second. When my mouse is moved, it's should record the position of Y and X value on the graph where Y is position of pointer and X is time in second. How i can do that?
3. How to set the sampling time??? I got error like this when I try to move my mouse continously
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at ChartControl.ChartControlForm.DrawChart()
at ChartControl.ChartControlForm.AddValue(Single val)
at tes01.Form1.gerakMouse(Object sender, MouseEventArgs e) in C:\Users\akoe\Documents\Visual Studio 2008\Projects\tes01\tes01\Form1.cs:line 43
4. Last question is, why mouseMove event is not works in ChartControlForm ??
Thanks for attention, I hope get the answer for all my question. You can sent the answer to my e-mail :
blackhorse20032001@yahoo.com
|
|
|
|
 |
|
 |
bro..i am a newbie in programming..i cannot run the program. and i get the message like this..
"a project with an output type of class library cannot be started directly.
in order to debug this project, add an exevutable project to this solution which references the library project. set the executable project as the starup project.
"
what i have to do???
|
|
|
|
 |
|
 |
hi,
this code is a class library, it should be used by another project which is runnable.
simply create a .NET windows application, and include my project as a reference.
Then you can add it as component to any form you like.
Good luck.
|
|
|
|
 |
|
 |
The exception: {"Index was outside the bounds of the array."}, was generated by intent look for a -1 index in the array Values, the solution for me was include the follow line just after to the "for" loop:
if (i=0) continue; // or if you like i++ almost it's the same.
Thanks Roy, this code it's excelent.
|
|
|
|
 |
|
 |
hi,
can you please give me a line number where you added it, or the function it was added to?
Thanks!
|
|
|
|
 |
|
 |
I was facing the exact same issue. I tried doing a, "i > 0 ? Value[i-1] : 0" but it screwed up the graph. The above solution worked for me.
Btw, Roy, this control is excellent. It came in handy for me when I wanted to show a real-time performance monitor. However there are performance issues specially during the drawing. The control flickers a lot. I will try improving upon it.
Best regards from India!
|
|
|
|
 |
|
 |
How do you change the bar width? We have a very small volume of data so want to see it advance fast.
Thank you
|
|
|
|
 |
|
 |
Hi, I want to implement your realtime graph in my temperature monitoring software, the range og my temperature will be 0-100 deg celcius. But I realize your application can only go up to 40. How can I change the setting,so that the 0 point white line will be lower instead of in the middle and how can I get up to 100 by changing the coding in ChartControlForm.cs ?
I mananged to change the valuemultiplier to 0.5, so it can show up to 80 or more, but the chart didnt show up the value...just flat line..
When I wanna move the axes lower(the white line):
g.DrawLine(new Pen(AxesColor),0,(int)(ChartPanel.Size.Height/8),ChartPanel.Size.Width,(int)(ChartPanel.Size.Height/8));
Why the line jump up intead of appearing in the lower PART OF THE CHART..?
Please add me if you do got a msn, thz for your attention.
jamezun@hotmail.com
James
-- modified at 5:09 Tuesday 19th June, 2007
|
|
|
|
 |
|
|
 |
|
 |
I think the LeadFromValues() method doesn't work... Ever tried it? Or am I doing something wrong?
private void button1_Click(object sender, EventArgs e)
{
int i;
float[] TestValues;
TestValues = new float[textBox1.Lines.Length];
for (i = 0; i < TestValues.GetLength(0); i++)
{
TestValues[i] = float.Parse(textBox1.Lines[i].ToString());
}
graph1.LoadFromValues(TestValues);
graph1.Refresh();
}
|
|
|
|
 |
|
 |
Hi,
you do need to call RefreshControl()
but there was a bug with this function anyway
however, I've already sent a new fixed version for upload.
You may download it whenever they accept it.
Thanks!
|
|
|
|
 |
|
 |
Hello Roy
I had problems with you test applicaiton and its solution and had to build my own. To test your application I created an applicaiton that would generated random data and pass it to you control using a background thread.
If you would like my test application please drop me a message.
I found that your control generates an exception after a minute or two of running on the random number generator.
----
if (Values[i] < 0) // Less than 0, UnderColor is used
{
if (IntCmp(Values[i], Values[i - 1]) < 0) //if it goes above 0
----
The Error
{"Index was outside the bounds of the array."}
" at ChartControl.ChartControlForm.DrawChart() in C:\\code\\NET\\Controls\\ChartControl\\ChartControlForm.cs:line 283\r\n at ChartControl.ChartControlForm.AddValue(Single val) in C:\\code\\NET\\Controls\\ChartControl\\ChartControlForm.cs:line 147\r\n at ChartTrialProgram.frmMain.backgroundWorker1_DoWork(Object sender, DoWorkEventArgs e) in C:\\code\\NET\\Controls\\ChartControl\\ChartTrialProgram\\frmMain.cs:line 66\r\n at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)\r\n at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)"
To fix this I would use a circular buffer for you data values this would keep the data list to a prodictable size.
Also the background (green and black grid) moves and I think your control work look better if you could stop this.
Robert
|
|
|
|
 |
|
 |
The fact that the background moves is on purpose to create a realtime feel to the control.
however, I'd really like to see your test application to fix the exception
|
|
|
|
 |
|
 |
I'm not quite sure I'd call this 'real time' I was hoping to see something multithreaded to avoid excessive delays in responsiveness for larger datasets. Displaying multiple charts with a thousand points each might bring the 'real time' to a standstill.
Is there a reason this was not addressed, or was the control simply not meant for that much data / that many instances?
-MBirchmeier
|
|
|
|
 |
|
 |
Hi,
The reason I called it realtime is that the control uses mostly the AddValue method, which when used moves the whole grid in the control making it look like realtime monitoring graphs (like the cpu usage graph in the task manager for instance). it's not just a graph that takes a bunch of values and displays them. anyhow, your comment is good because I think it's a good idea to improve the control using multithreads.
|
|
|
|
 |