Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to draw a graph

How to draw a graph

Scheduled Pinned Locked Moved Visual Basic
data-structuresquestiontutorial
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mr2003
    wrote on last edited by
    #1

    Hi (i've been askin my questions in a backwards manner) anyways I have 2 arrays of data, One array for x-axis and one for y-axis. How can I make a 2D Bar graph ? Ehsan Behboudi

    S R 2 Replies Last reply
    0
    • M mr2003

      Hi (i've been askin my questions in a backwards manner) anyways I have 2 arrays of data, One array for x-axis and one for y-axis. How can I make a 2D Bar graph ? Ehsan Behboudi

      S Offline
      S Offline
      SimonS
      wrote on last edited by
      #2

      If you want it for the web, see your repeat post below and Chris's suggestion. If it's for a Win32 client, consider using GDI+ and painting onto the form directly. Cheers, Simon "From now on, if rogue states want to buy weapons of mass destruction, they're going to have to go on eBay," Mr. Bezos said.

      M 1 Reply Last reply
      0
      • S SimonS

        If you want it for the web, see your repeat post below and Chris's suggestion. If it's for a Win32 client, consider using GDI+ and painting onto the form directly. Cheers, Simon "From now on, if rogue states want to buy weapons of mass destruction, they're going to have to go on eBay," Mr. Bezos said.

        M Offline
        M Offline
        mr2003
        wrote on last edited by
        #3

        You mean in order to display it in a html page, i should save it as jpg. If we go one step back, to making the graph it self. How can I do that>?:eek: Ehsan Behboudi

        1 Reply Last reply
        0
        • M mr2003

          Hi (i've been askin my questions in a backwards manner) anyways I have 2 arrays of data, One array for x-axis and one for y-axis. How can I make a 2D Bar graph ? Ehsan Behboudi

          R Offline
          R Offline
          Ray Cassick
          wrote on last edited by
          #4

          2D bar graphs on an HTML page are easy... 1 - Create a table that has as columns rows as you need data columns. 2 - Create a gfew gif images that are 1 pixel high and as wide as you need the data column to be. 3 - Figure the biggest size you need to hold all your data and create your table to hold that size. 4 - Figure each of the other data points as a percentage of the highest value. 5 - Place each of the images into the table column, and set it's height equal to the percentage of that data point to the largest number.

          M 1 Reply Last reply
          0
          • R Ray Cassick

            2D bar graphs on an HTML page are easy... 1 - Create a table that has as columns rows as you need data columns. 2 - Create a gfew gif images that are 1 pixel high and as wide as you need the data column to be. 3 - Figure the biggest size you need to hold all your data and create your table to hold that size. 4 - Figure each of the other data points as a percentage of the highest value. 5 - Place each of the images into the table column, and set it's height equal to the percentage of that data point to the largest number.

            M Offline
            M Offline
            mr2003
            wrote on last edited by
            #5

            I would like to clear few things for myself: by table,, you mean an array? gif image is an object that i can choose,, is that correst? Ehsan Behboudi

            R 1 Reply Last reply
            0
            • M mr2003

              I would like to clear few things for myself: by table,, you mean an array? gif image is an object that i can choose,, is that correst? Ehsan Behboudi

              R Offline
              R Offline
              Ray Cassick
              wrote on last edited by
              #6

              Let's back up a bit here... What type of application are you writing? Web app or Forms based app? VB6 or VB.NET?

              M 1 Reply Last reply
              0
              • R Ray Cassick

                Let's back up a bit here... What type of application are you writing? Web app or Forms based app? VB6 or VB.NET?

                M Offline
                M Offline
                mr2003
                wrote on last edited by
                #7

                The application is VB it is a forms based. and its VB6 I basically have two arrays , one for X-axis and one for y-axis. and all I would like to make a bar graph. :) Ehsan Behboudi

                R 1 Reply Last reply
                0
                • M mr2003

                  The application is VB it is a forms based. and its VB6 I basically have two arrays , one for X-axis and one for y-axis. and all I would like to make a bar graph. :) Ehsan Behboudi

                  R Offline
                  R Offline
                  Ray Cassick
                  wrote on last edited by
                  #8

                  Here is a great link to a sample that shows you ho to use the MSChart control that comes with VB. Sample Clickety[^] Paul Watson wrote: At the end of the day it is what you produce that counts, not how many doctorates you have on the wall.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups