|
public class CrossHairBehaviorExt : ChartCrossHairBehavior
{
protected override void GenerateLabel(ChartPointInfo pointInfo, ChartAxis axis)
{
base.GenerateLabel(pointInfo, axis);
// The corresponding axis can be get by checking the X and Y values. The X and Y values can also be get directly.
if(pointInfo.ValueY == null)
{
string x = pointInfo.ValueX;
var currentPrimaryAxis = pointInfo.Axis;
}
else
{
string y = pointInfo.ValueY;
var currentSecondaryAxis = pointInfo.Axis;
}
}
} |