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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. LABEL for X and Y Axis

LABEL for X and Y Axis

Scheduled Pinned Locked Moved C#
visual-studiosaleshelpquestion
5 Posts 2 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.
  • I Offline
    I Offline
    It_tech
    wrote on last edited by
    #1

    Hi All, I am using a Chart control in VS 2010 .Can any one help me which property of this control allow me to Name my X and Y axis. The Values are defined by for instance Series("Test").XValueMember. I would like to name my X axis as 'Hour' and Y axis as 'Revenue' Can you advice please? Many thanks

    J 1 Reply Last reply
    0
    • I It_tech

      Hi All, I am using a Chart control in VS 2010 .Can any one help me which property of this control allow me to Name my X and Y axis. The Values are defined by for instance Series("Test").XValueMember. I would like to name my X axis as 'Hour' and Y axis as 'Revenue' Can you advice please? Many thanks

      J Offline
      J Offline
      JF2015
      wrote on last edited by
      #2

      Hi, the Chart Control provided by MS and integrated in VS2010 has some very good examples that show how to use them. Please see: http://code.msdn.microsoft.com/mschart[^] There is also a small tutorial available here: http://blogs.msdn.com/b/alexgor/archive/2008/11/05/creating-small-charts-with-microsoft-chart-control.aspx[^]

      I 1 Reply Last reply
      0
      • J JF2015

        Hi, the Chart Control provided by MS and integrated in VS2010 has some very good examples that show how to use them. Please see: http://code.msdn.microsoft.com/mschart[^] There is also a small tutorial available here: http://blogs.msdn.com/b/alexgor/archive/2008/11/05/creating-small-charts-with-microsoft-chart-control.aspx[^]

        I Offline
        I Offline
        It_tech
        wrote on last edited by
        #3

        Thanks for your reply.All i wanted was how to name my X axis as for instance 'Product' and my Y axis 'Sales'. The link you have sent doesnt explain include this topic. Please advice. Thanks

        J 1 Reply Last reply
        0
        • I It_tech

          Thanks for your reply.All i wanted was how to name my X axis as for instance 'Product' and my Y axis 'Sales'. The link you have sent doesnt explain include this topic. Please advice. Thanks

          J Offline
          J Offline
          JF2015
          wrote on last edited by
          #4

          Hi, Here is a piece of code that does exactly what you want:

          // Set axis title
          Chart1.ChartAreas\["ChartArea1"\].AxisX.Title = "Chart Axis";
          

          I copied it from a sample found here (source code is available on that site): http://quickstart.xs4all.nl/samples/code/chart/default.aspx[^]

          I 1 Reply Last reply
          0
          • J JF2015

            Hi, Here is a piece of code that does exactly what you want:

            // Set axis title
            Chart1.ChartAreas\["ChartArea1"\].AxisX.Title = "Chart Axis";
            

            I copied it from a sample found here (source code is available on that site): http://quickstart.xs4all.nl/samples/code/chart/default.aspx[^]

            I Offline
            I Offline
            It_tech
            wrote on last edited by
            #5

            Thanks So much for your help.Its Much appreciated.Sorry to mention another Problem i have is to Put a $ sign in fromt of the Y axis. .Series("Revenue").IsValueShownAsLabel = True I have to show numbers that are in $ Sign? How could i do that? When i do the formatting on the Numbers i get a problem with the layout of the Graph. Could you please advice? Thanks

            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