Menu

PaneGap, Marker Fill, Data point click events

Help
Fargelsnot
2005-03-29
2012-09-19
  • Fargelsnot

    Fargelsnot - 2005-03-29

    Hi all,

    Yesterday was my first time looking at ZedGraph. I was amazed at how awesome this thing is! I do have a couple of quick questions for anyone that has time to respond.

    1. I found a post in here that said to change the amount of space on the border to change the GraphPane.PaneGap. Can anyone be more specific on this? I wasn't able to find PaneGap as a property anywhere.

    2. Is it possible to "fill" the markers? Diamonds, circles, squares, etc.. Want to know if you can make these filled solid. I saw that the code was commented for the ones that could not be filled (because they had no borders), but I was unable to figure out how to set the others up with a fill.

    3. I'm interested in doing some custom things for my application when the user clicks on a datapoint (for example, pop open another form with detailed information about that data point). I'm sure someone out there has done this - can anyone lend some sample code or point me in the right direction?

    Thanks for the help!

     
    • John Champion

      John Champion - 2005-03-29

      Hi,
      Thanks for the feedback.

      1) PaneGap is gone. You now have:

      GraphPane.MarginLeft, MarginRight, etc. gives access to individual margins.
      GraphPane.MarginAll sets them all at once.

      2) Assuming you have LineItem myCurve = myPane.AddCurve(...):

      myCurve.Symbol.Fill = new Fill( Color.White );

      fills them with white.

      3) If you are using the UserControl in a form, just set ZedGraphControl.IsShowPointValues = true to enable tooltips. If you need more than this, you can use GraphPane.FindNearestObject() in response to a MouseDown event to get the information you need.

      John

       
    • Fargelsnot

      Fargelsnot - 2005-03-29

      John,

      Thanks for such a quick response. I got everything to work in 1 and 2. I'm not quite to 3 yet - ( I have added some other thing to the tooltip, I found another thread on that, but I will need to use the FindNearestObject for some other functionality.

      Thanks again!

       

Log in to post a comment.

MongoDB Logo MongoDB