Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart3D 3D Charting Tools for .Net (VB and C#)
 Getting Data on mouse click

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
victorvikas Posted - 18 Apr 2007 : 02:19:59
Hi

Once the chart is plotted , how can I get the the data(X,Y,Z axis values and their titles) of the point of click of mouse such that i can store it in some other variables and manipulate them as required??

Thanks & Regards
Vikas.
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 18 Apr 2007 : 11:03:09
We are not sure what you mean by "get the the data(X,Y,Z axis values and their titles). Are you talking about clicking on an axis object, and retrieving some values, or are you talking about clicking on a data point and retrieving some values?

You can retrieve the values of data points by deriving a new class from our DataToolTip class, overriding the OnMouseUp method, where you can get the data point. See the other examples in the MouseListeners example program.

		// Custom data tooltip class
class CustomToolTip: DataToolTip 
{ 
  public CustomToolTip(LinePlot3D component): base (component) 
  {
  }

  public override void OnMouseUp (MouseEventArgs mouseevent)
  {
    // get data about nearest point
    NearestPointData npd = GetNearestPoint();
    if (npd != null)
    {
      int selectedindex = npd.NearestPointIndex;
      Point3D p3d = npd.NearestPoint;
      System.Console.Out.Write("X = " + p3d.X.ToString() + " ");
      System.Console.Out.Write("Y = " + p3d.Y.ToString() + " ");
      System.Console.Out.Write("Z = " + p3d.Z.ToString() + " ");
      System.Console.Out.WriteLine();
    }
  }
}

.
.
.
.
// In the main graph building routine
CustomToolTip datatooltip = new CustomToolTip(this);
datatooltip.SetDataToolTipFormat(ChartObj.DATA_TOOLTIP_CUSTOM);
datatooltip.SetEnable(true);
chartVu.AddMouseListener(datatooltip);  



Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07