Click here to Skip to main content
16,003,417 members
Home / Discussions / C#
   

C#

 
QuestionGraphical data representation Pin
hotthoughtguy25-Mar-09 8:23
hotthoughtguy25-Mar-09 8:23 
AnswerRe: Graphical data representation Pin
0x3c025-Mar-09 9:20
0x3c025-Mar-09 9:20 
QuestionMs WORD Bug Pin
Morad SAJID25-Mar-09 8:22
Morad SAJID25-Mar-09 8:22 
Questionsalam Pin
hotthoughtguy25-Mar-09 7:46
hotthoughtguy25-Mar-09 7:46 
AnswerRe: salam Pin
0x3c025-Mar-09 7:48
0x3c025-Mar-09 7:48 
GeneralRe: salam Pin
hotthoughtguy25-Mar-09 8:11
hotthoughtguy25-Mar-09 8:11 
GeneralRe: salam Pin
dan!sh 25-Mar-09 9:10
professional dan!sh 25-Mar-09 9:10 
GeneralRe: salam Pin
0x3c025-Mar-09 9:19
0x3c025-Mar-09 9:19 
The drawing is rather simple. I think you might even be able to find some articles on graph rendering on CodeProject. The basic idea, however is something like this:

  1. Get the highest value in the data range
  2. Get the lowest value in the data range
  3. Get the difference between them
  4. Divide the height by the result from step 3. This is how many pixels to get higher by for each unit
  5. Set the initial X coordinate to 0
  6. Set the line thickness to 3
  7. Iterate through each data value

    1. Multiply the value by the division. Subtract this from the height. You now have your Y coordinate
    2. Draw a line from (X, Height) to (X,Y) with the aforementioned line thickness
    3. Add the line thickness to X


Please remember, though, that this doesn't take into account having rather a lot of data points. If there are too many, then you may get an error. You'll probably have to take this into account yourself, but this should get you started
AnswerRe: salam Pin
Henry Minute25-Mar-09 11:10
Henry Minute25-Mar-09 11:10 
GeneralRe: salam Pin
hotthoughtguy25-Mar-09 18:57
hotthoughtguy25-Mar-09 18:57 
QuestionBinding issue Pin
hb5213421425-Mar-09 7:43
hb5213421425-Mar-09 7:43 
AnswerRe: Binding issue Pin
Henry Minute25-Mar-09 11:19
Henry Minute25-Mar-09 11:19 
AnswerRe: Binding issue Pin
DaveyM6925-Mar-09 11:28
professionalDaveyM6925-Mar-09 11:28 
Questionurgently required.. pls reply... Pin
Nirmala VijayAseelan25-Mar-09 7:37
Nirmala VijayAseelan25-Mar-09 7:37 
AnswerRe: urgently required.. pls reply... Pin
CPallini25-Mar-09 8:11
mveCPallini25-Mar-09 8:11 
AnswerRe: urgently required.. pls reply... Pin
MumbleB25-Mar-09 8:23
MumbleB25-Mar-09 8:23 
AnswerRe: urgently required.. pls reply... Pin
DaveyM6925-Mar-09 11:29
professionalDaveyM6925-Mar-09 11:29 
AnswerRe: urgently required.. pls reply... Pin
Henry Minute25-Mar-09 14:30
Henry Minute25-Mar-09 14:30 
AnswerRe: urgently required.. pls reply... Pin
King Julien25-Mar-09 19:33
King Julien25-Mar-09 19:33 
GeneralRe: urgently required.. pls reply... Pin
Nirmala VijayAseelan26-Mar-09 7:12
Nirmala VijayAseelan26-Mar-09 7:12 
GeneralRe: urgently required.. pls reply... Pin
King Julien26-Mar-09 19:29
King Julien26-Mar-09 19:29 
QuestionHow to declare/tie a mdigrandchild form to mdiGrandParent form? Pin
Lecutus125-Mar-09 7:04
Lecutus125-Mar-09 7:04 
AnswerRe: How to declare/tie a mdigrandchild form to mdiGrandParent form? Pin
Henry Minute25-Mar-09 11:24
Henry Minute25-Mar-09 11:24 
GeneralRe: How to declare/tie a mdigrandchild form to mdiGrandParent form? Pin
Lecutus126-Mar-09 7:53
Lecutus126-Mar-09 7:53 
GeneralRe: How to declare/tie a mdigrandchild form to mdiGrandParent form? Pin
Henry Minute26-Mar-09 9:07
Henry Minute26-Mar-09 9:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.