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. Resize zedgraph and expand axis ranges

Resize zedgraph and expand axis ranges

Scheduled Pinned Locked Moved Visual Basic
questioncsharphelp
4 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.
  • C Offline
    C Offline
    CrocodileBuck
    wrote on last edited by
    #1

    Hello, i have a little problem with zedgraph (used in vb.net): On a form lies one zedgraph which shows one chart (curve). I want to resize the form, but not the chart/curve. In the form's resize event i set the size of the control. With ZedGraphControl1 .Top = PanelPatientInfo.Top + PanelPatientInfo.Height .Left = 0 .Height = Me.ClientSize.Height - .Top .Width = Me.ClientSize.Width - .Left End With But when i do this the complete chart is scaled. (It is like zooming in/out...) I want the maximum of the x and y axis to get greater/smaller. How can i do that? Thanks in advance! Croc

    D 1 Reply Last reply
    0
    • C CrocodileBuck

      Hello, i have a little problem with zedgraph (used in vb.net): On a form lies one zedgraph which shows one chart (curve). I want to resize the form, but not the chart/curve. In the form's resize event i set the size of the control. With ZedGraphControl1 .Top = PanelPatientInfo.Top + PanelPatientInfo.Height .Left = 0 .Height = Me.ClientSize.Height - .Top .Width = Me.ClientSize.Width - .Left End With But when i do this the complete chart is scaled. (It is like zooming in/out...) I want the maximum of the x and y axis to get greater/smaller. How can i do that? Thanks in advance! Croc

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      CrocodileBuck wrote:

      I want to resize the form, but not the chart/curve. In the form's resize event i set the size of the control. With ZedGraphControl1 .Top = PanelPatientInfo.Top + PanelPatientInfo.Height .Left = 0 .Height = Me.ClientSize.Height - .Top .Width = Me.ClientSize.Width - .Left End With

      Uhhh, maybe I just don't get the requirement, but if you don't want the chart to resize, why did you supply all this code to resize the chart??

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      A 1 Reply Last reply
      0
      • D Dave Kreskowiak

        CrocodileBuck wrote:

        I want to resize the form, but not the chart/curve. In the form's resize event i set the size of the control. With ZedGraphControl1 .Top = PanelPatientInfo.Top + PanelPatientInfo.Height .Left = 0 .Height = Me.ClientSize.Height - .Top .Width = Me.ClientSize.Width - .Left End With

        Uhhh, maybe I just don't get the requirement, but if you don't want the chart to resize, why did you supply all this code to resize the chart??

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        A Offline
        A Offline
        alBasic
        wrote on last edited by
        #3

        Hmmm, ok... Let me try to explain it. When i resize the form (on which the zedgraph lies) then the zedgraph should fill the form. This is working fine. What i want is: The bigger the form and the zedgraph control gets, the bigger the max value of the y/x axis should become. Example: My form is 200x200 pixel and the zedgraph too. The maximum value on the y axis is 200. Now i resize the form manually to 300x300. So i want the max value on my y axis to increase from 200 to 300 too. At the moment only the chart (which is contained in the control) gets resized. How can i change the max value of my axis? Many thanks in advance!

        D 1 Reply Last reply
        0
        • A alBasic

          Hmmm, ok... Let me try to explain it. When i resize the form (on which the zedgraph lies) then the zedgraph should fill the form. This is working fine. What i want is: The bigger the form and the zedgraph control gets, the bigger the max value of the y/x axis should become. Example: My form is 200x200 pixel and the zedgraph too. The maximum value on the y axis is 200. Now i resize the form manually to 300x300. So i want the max value on my y axis to increase from 200 to 300 too. At the moment only the chart (which is contained in the control) gets resized. How can i change the max value of my axis? Many thanks in advance!

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          alBasic wrote:

          How can i change the max value of my axis?

          That's a question for a forum that specifically deals with ZedGraph. I have no idea how to use that library since I've never seen it. But, it sounds like all you have to do is take the width of the form and plug that into the Y-Axis of your graph. How you do that is a question for the people who wrote ZedGraph.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          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