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);