How To: Custom Crosshair & Tool Tip in v.2.9.0


#1

Hello to all,

chart.crosshair.style - seems “style” is deprecated, yet it is the only way I have been able to modify the crosshair properties such as line color, border width, tool tip text font, etc. According to the documentation, and another thread post - we should “create a new class that implements the SChartCrosshair protocol.”

I have a line chart class that implements “SChartCrosshairProtocol”, but it is not clear how to gain access to my charts crosshair properties. I have examined all the Sample projects and searched this forum to no avail and unable to find any assistance for my scenario - which is simple at this time: modify the available crosshair properties to match my application UI theme (colors).

Any guidance / example would be greatly appreciated.

Thank you.


#2

Hi RC51,

Thanks for getting in touch!

The style object has been moved from the SChartCrosshair Protocol to the SChartCrosshair class.

So to access the style object you need to cast the crosshair to the SChartCrosshair class.

Let me know if you have any questions.

Kind regards,
Andrew Polkinghorn.


#3

Works great - Thank you!