You can use a subclass of the DataToolTip class, much like the ChartZoom class in the previous example
class CustomToolTip : DataToolTip
{
public CustomToolTip(ChartView component)
: base(component)
{
}
public override void OnDoubleClick(EventArgs me)
{
MouseEventArgs mouseevent = (MouseEventArgs)me;
Point2D mousepos = new Point2D();
mousepos.SetLocation(mouseevent.X, mouseevent.Y);
base.OnDoubleClick(me);
ChartPlot selectedPlot = (ChartPlot)GetSelectedPlotObj();
if (selectedPlot != null)
{
int selectedindex = GetNearestPoint().GetNearestPointIndex();
PhysicalCoordinates transform = GetSelectedCoordinateSystem();
}
}
}
Install it in the main part of the program using code similar to:
CustomToolTip tooltip = new CustomToolTip(this);
tooltip.SetDataToolTipFormat(ChartObj.DATA_TOOLTIP_CUSTOM);
tooltip.SetEnable(true);
this.SetCurrentMouseListener(tooltip);
If you are still using a trial version of the software after more than 30 days, you should think about getting a commercial license.