473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to draw a line graph?

46
Hi all..
How to draw a line graph? My axis-x is the daily hour from 8am to 8pm. Can i use a XY mschart type to draw it? Or I must use a picture box to draw it? If with XY chart type, how to draw?
Thank you..
Jun 10 '07 #1
1 4342
Atran
319 100+
Hello, Read this code:

Expand|Select|Wrap|Line Numbers
  1. Imports System
  2. Imports System.Drawing
  3.  
  4. Public Class Form1
  5.  
  6.     'We make a new paint event handler.
  7.     Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As PaintEventArgs) Handles MyBase.Paint
  8.  
  9.         'We make a new pen.
  10.         Dim myPen As New Pen(Color.White, 5)
  11.  
  12.         'Draw a line.
  13.         'e keyword is the PaintEventArgs.
  14.         e.Graphics.DrawLine(myPen, 12, 12, 200, 200)
  15.  
  16.         'Clean up from the memory.
  17.         e.Dispose()
  18.     End Sub
  19. End Class
  20.  
Jun 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: srinivas | last post by:
Hi all, I have one requirement.Is there any way to create a line graph using javascript.If it is please send me the sample code.But the thing is it should work in all browsers. Thanks,...
4
by: Tiggy | last post by:
I am wondering if there exists any component in VB .Net allowing to draw a graph in X and Y ? Of course I can draw line by line but is there not another way to do it and will it be possible to...
1
by: balakrishnan.dinesh | last post by:
Hi frnds, Im creating function to plot line graph in javascript . I have marked the points in graph. but what i need to do is, i want to draw the line between those marked point, but i dont...
9
by: balakrishnan.dinesh | last post by:
Hi frnds, I want to draw pie graph or line graph through javascript. Can anyone give me a sample code for these charts. Thank you Dinesh
2
by: Lamis | last post by:
Hi, I want to draw a line graph in my C# form. it is in real time so the graph will constantly get new values. it should show one line for maximum value, one line for minimum value and a third for...
0
by: suedasszyy | last post by:
Haiiii.... i'm new for VB.net. can someone help me to solve those question? is it possible to draw a graph such as Sin graph using console application? if not, how can i draw a graph...
0
by: vimalapalanichamy | last post by:
Actually i am using PIC16F877 controller for my project.The inputs for the line graph are came from controller (through RS232).Now i am trying to get the data through RS232 from the controller to vb...
7
by: =?iso-8859-1?Q?Vicente_Garc=EDa?= | last post by:
Hi, I need to programmatically draw a graph (his nodes and his edges) from dynamic XML file. The graph is very complex and I don't know how I could do this task. Any ideas please? Microsoft...
3
by: mistusen | last post by:
the nodes of the graph has got x and y coordinate.we'll have to draw a directed graph with the nodes in java.where can i find the source code or what is used to draw the graph?plz suggest.how can i...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.