In the Knowledge Base, an article discusses a rollover modifier that utilises a vertical hit test to draw a vertical line at the cursor and highlight the nearest point: http://support.scichart.com/index.php?/Knowledgebase/Article/View/17235/32/custom-chartmodifiers—part-1—creating-a-custom-rollover-modifier
This is perfect for data which moves/is unique along the X axis (such as time series data).
How can I best replicate this modifier for data which moves/is unique along the Y axis? Drawing a horizontal line is easy, but there is no HorizontalSliceHitTest function.
- Rick C asked 8 years ago
- You must login to post comments
Hi Rick
Are you talking about a chart which has been rotated using our Flipped / Vertical Charts API? If so, then VerticalSliceHitTest will work in this case as well. Everything gets transformed by 90 degrees.
However, if you are looking for a Horizontal Slice hit-test then I’m afraid one doesn’t exist. The best I can recommend is to use our X-Y Hit-Test API and to search for the nearest X-value at corresponding Y in order to find the closest point.
Best regards,
Andrew
- Park soochan answered 8 years ago
- I wasn’t referring to a flipped chart, but using one is I guess an acceptable workaround. I tried the X-Y hit-test API approach and didn’t have much success. Taking the VerticalStickyHitTestRolloverModifier (as I renamed the one in the Knowledge Base) and simply drawing a horizontal line instead (thus HorizontalStickyHitTestRolloverModifier) with the caveat that it only works on rotated charts is simple enough, if a little inelegant.
- You must login to post comments
Please login first to submit.