473,811 Members | 2,485 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Drawing Simple Graph in VB

20 New Member
Hi,

I have a user entering information into a MSFlexGrid and want to graph some of the data using a line graph. I tried using MSChart but it doesn't seem to work for me. Does anyone have any other suggestions?

Thanks in advance.
May 14 '07 #1
5 4630
Killer42
8,435 Recognized Expert Expert
I have a user entering information into a MSFlexGrid and want to graph some of the data using a line graph. I tried using MSChart but it doesn't seem to work for me. Does anyone have any other suggestions?
You could draw it yourself. For that matter, you could create a user control which draws a chart the way you want.

By the way, what version of VB are you using?

Also, if you describe what you don't like about MSChart, there may be someone who knows a way around the problem.
May 15 '07 #2
j2flk1234
20 New Member
You could draw it yourself. For that matter, you could create a user control which draws a chart the way you want.

By the way, what version of VB are you using?

Also, if you describe what you don't like about MSChart, there may be someone who knows a way around the problem.
I am using VB6. The problem I had with MSChart was that I wasn't able to find a way to assign the data from my MSFlexGrid to the MSChart.

Right now I am using a picture box and the Line function to create a graph but the problem I am having with that is that I can't seem to give the graph an axis and the graph doesn't look too pretty.

If someone could help me out that would be great. Thanks!!
May 15 '07 #3
Killer42
8,435 Recognized Expert Expert
I am using VB6. The problem I had with MSChart was that I wasn't able to find a way to assign the data from my MSFlexGrid to the MSChart.

Right now I am using a picture box and the Line function to create a graph but the problem I am having with that is that I can't seem to give the graph an axis and the graph doesn't look too pretty.

If someone could help me out that would be great. Thanks!!
Hm... can you explain in more detail what you mean by "can't seem to give the graph an axis"? (I'll take a stab in the dark and say that you need to turn AutoRedraw on before drawing your axis, and off again afterward. But that's just guesswork, of course.)

As for MSChart, you might do well to try the search box up the top of the page. The MSChart control has been discussed here quite a few times, so you may find what you need is already here.
May 15 '07 #4
j2flk1234
20 New Member
Hm... can you explain in more detail what you mean by "can't seem to give the graph an axis"? (I'll take a stab in the dark and say that you need to turn AutoRedraw on before drawing your axis, and off again afterward. But that's just guesswork, of course.)

As for MSChart, you might do well to try the search box up the top of the page. The MSChart control has been discussed here quite a few times, so you may find what you need is already here.
Hi,

The problem with the axis is that when i draw a line graph nothing on the axis shows up. So if my y axis is from 0 to 1 i want that to show up but it doesn't.

I've also checked the other inquires about MSChart but nothing really seems to help me out. Mostly everything I have seen online has MSChart working with a database or datagrid but not a flexgrid, any ideas?
May 17 '07 #5
Killer42
8,435 Recognized Expert Expert
I finally figured out how to use MSChart, one thing I was wondering was whether it is possible to have an x y and z axis using this chart?
I don't know. I'd suggest you post that as a new question, here in the VB forum, for a better response.

A lot of people watch for questions with no replies, so won't notice a thread which has gone on for a while like this one.

In fact, I'll do it for you. Here, I've split off that message to this thread.
May 18 '07 #6

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

Similar topics

6
11922
by: TheDD | last post by:
Hi all, i have a question: is there any librairy for drawing graphs with PHP? Not graphs like histogram or alike, but like a set of shapes linked together in a certain way (like a flow chart or call graph). I have found a script to handle the graph in memory but i can already do that, my problem is to draw it (it an optimal way, and without crossing
8
48051
by: Stefan Burger | last post by:
Those of you who are in need for drawing vector lines might be interested in the following code. DrawLine( x1, y1, x2, y2, color ) draws a vector line from any Point x1,y1 to any Point x2,y2 in any color (string format #RRGGBB) by using div-tags. regards Stefan ###############code starts here#########################
0
1664
by: SS KANAGAL | last post by:
Hello, I am drawing a bar graph in an aspx page using System.Drawing namespace . Now I want to provide drill down facility for the graph i.e. on click of a bar in the graph it should get me yet another graph with different data populated in that graph. I want to know how to provide href for each bar in the graph in the code behind.
0
1363
by: SS KANAGAL | last post by:
Hello, I am drawing a bar graph in an aspx page using System.Drawing namespace . Now I want to provide drill down facility for the graph i.e. on click of a bar in the graph it should get me yet another graph with different data populated in that graph. I want to know how to provide href for each bar in the graph in the code behind.
1
3633
by: DBC User | last post by:
Hi Sharpies, This is a very basic question. I am using .Net IDE 2003 and System.Drawing.dll (1.1.4322). I wrote a simple program like this (ommitting the commons) using System.Drawing; .. ..
1
1641
by: anthonyroche | last post by:
Does anyone know of a product that allows a user to draw a line on a chart? eg A historical stock tracker would have a line graph of say Aug 03 to Dec 03, which is a line graph representing a stock over that period. I want to give the user the functionality to draw a line on the graph (Straight line) representing what they consider the trend. All web based.. Any information would be of great help, I have already the component that does...
2
276
by: ys | last post by:
Good day.Currently I am doing Knowledge Base Planner. I do wish to show a result of my plan on the interface. What should i read in Graphics / Drawing to display my result by showing a straight line of 5 nodes (Initial State till the Goal State). Can somebody please help me to solve this problme? Thank you. I do very appreciate if somebody could teach me asap, b'cos i am running out of time for my project.
1
1445
by: RichMo | last post by:
Hi, I'm new to C++ and i can't seem to find a tutorial on the net for this one. I have a dialog based MFC app running that reads sensors using a USB interface device. At the moment the varying data just moves a progress bar up and down. I'm looking for a way to display this sensor data as a graph on the
9
3191
by: davetelling | last post by:
I am not a programmer, I'm an engineer trying to make an interface to a product I'm designing. I have used C# to make a form that interrogates the unit via the serial port and receives the data. I want to be able to draw lines in a picturebox based upon certain data points I have received. I dragged a picturebox from the toolbar onto my form, but after having gone through the help files, looking online and trying a variety of things, I...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10648
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10389
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7670
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6890
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3018
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.