viewxy - SeriesEventMarker not tracking correct axis
Posted: Fri Jan 29, 2016 4:18 pm
So, to preface this, i swear this used to work, and i don't know what happened!
I'm using a SeriesEventMarker in order to make a 'hovering tooltip' when my mouse gets close to a trace. On mouse move, i see how close I am to a trace, and if im close enough, i show a series event marker. Below is the code on how I create my series event marker
If i have exactly one series with one Y axis, everything works correctly (see screenshot 1). When i have multiple Y axis, and multiple series it's not working correctly.
Lets say that Series A is red, with Y axis set to visible (also red). Series B is blue (Y axis is not visible). When I hover over the red trace, the serieseventmarker is in the correct place.
If you hover over the blue trace, the Y placement of the marker is incorrect (see screenshot 2). I'm almost certain the serieseventmarker for the blue trace is having its value shown in reference to the red axis, and I want it in reference to the blue axis, which is where the series resides in the first place!
Please help!
screenshot 1:
I'm using a SeriesEventMarker in order to make a 'hovering tooltip' when my mouse gets close to a trace. On mouse move, i see how close I am to a trace, and if im close enough, i show a series event marker. Below is the code on how I create my series event marker
If i have exactly one series with one Y axis, everything works correctly (see screenshot 1). When i have multiple Y axis, and multiple series it's not working correctly.
Lets say that Series A is red, with Y axis set to visible (also red). Series B is blue (Y axis is not visible). When I hover over the red trace, the serieseventmarker is in the correct place.
If you hover over the blue trace, the Y placement of the marker is incorrect (see screenshot 2). I'm almost certain the serieseventmarker for the blue trace is having its value shown in reference to the red axis, and I want it in reference to the blue axis, which is where the series resides in the first place!
Please help!
screenshot 1:
Code: Select all
// crerate the marker shape
var markerShape = new PointShapeStyle()
{
Antialiasing = this.PreferenceTrackpointShapeAntiAlias,
BorderColor = this.PreferenceTrackpointShapeColor,
BorderWidth = this.PreferenceTrackpointShapeBorderWidth,
// There is a current bug. If you uncomment hiehgt or width you get MAD flickering
Height = this.PreferenceTrackpointShapeSize,
Width = this.PreferenceTrackpointShapeSize,
Shape = this.PreferenceTrackpointShapeShape
};
AlignmentVertical Vertical = AlignmentVertical.Bottom;
AlignmentHorizontal Horizontal = AlignmentHorizontal.Right;
var markerTitle = new EventMarkerTitle()
{
Text = TooltipMouseOverStringGenerate(xUnits, yUnits, xValue, yValue, nearestSample, " "),
Color = sampleSeries.LineStyle.Color,
VerticalAlign = Vertical,
HorizontalAlign = Horizontal
//, Distance = this.PreferenceTrackpointLabelOffset
};
SeriesEventMarker thisMarker = new SeriesEventMarker(
sampleSeries,
markerShape,
SeriesEventMarkerVerticalPosition.AtYValue,
xValue,
yValue,
markerTitle);