CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2003
    Location
    England
    Posts
    129

    [RESOLVED] Chart control in vc# express

    Hello all,

    Does anyone know how I can turn off the background grid in the chart control?
    This is the or that comes as default in visual studio c# express.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Chart control in vc# express

    Have you tried :

    Code:
    chart1.ChartAreas[0].AxisX.IsMarginVisible = false;
    chart1.ChartAreas[0].AxisY.IsMarginVisible = false;
    Also, this may help a lot as well :

    http://archive.msdn.microsoft.com/ms...ReleaseId=1591

  3. #3
    Join Date
    Sep 2003
    Location
    England
    Posts
    129

    Re: Chart control in vc# express

    Thanks, that helped a lot.

    However, I do not seem to be able to see a way to allow the control to scroll. Am I missing something?

    The specs state that the graph should display the most recent 60 seconds of activity but the user should be able to scroll back if required.

    Is that doable with this control?

  4. #4
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Chart control in vc# express

    Quote Originally Posted by SteveTaylor View Post
    However, I do not seem to be able to see a way to allow the control to scroll.
    The specs state that the graph should display the most recent 60 seconds of activity but the user should be able to scroll back if required.

    Is that doable with this control?
    Hi Steve.

    I'm not sure I'm following you... Do you want a scrollable chart control? Can you explain your need a bit more please?

  5. #5
    Join Date
    Sep 2003
    Location
    England
    Posts
    129

    Re: Chart control in vc# express

    Sorry, I should have been more clear.

    I would like a scrollable chart.

    The data is being read in once per second and will be drawn onto a line graph (this works).

    Once it has gone more than can be fitted on the screen the user needs to be able to scroll it.

    However, I cannot get this to work. I am not sure whether I am just being blind but I cannot find any exampe that quite does the trick.

  6. #6
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Chart control in vc# express

    Ahh, now I get you!

    Not so complicated. You just need the following Properties :

    chartArea.CursorX.AutoScroll
    chartArea.AxisX.ScaleView.Zoomable
    chartArea.AxisX.ScaleView.Zoom
    chartArea.AxisX.ScaleView.SmallScrollSize

    Here is a nice example :

    http://stackoverflow.com/questions/5...hart-control-c

    I hope I have helped

    Hannes

  7. #7
    Join Date
    Sep 2003
    Location
    England
    Posts
    129

    Thumbs up Re: Chart control in vc# express

    Perfect! Thanks!

  8. #8
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Chart control in vc# express

    That is good news Glad you came right!

    Please mark your thread resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured