This is a migrated thread and some comments may be shown as answers.

Dynamic color for categoryAxis.crosshair

1 Answer 73 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Hưởng
Top achievements
Rank 1
Hưởng asked on 24 Sep 2018, 11:16 AM

Hello,

can I set dynamic color for categoryAxis.crosshair?
I try to set dynamic color for crosshair based on the conditional.
But this option do not support function.

Then can i set dynamic color for this?

Thanks,

Huong

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 26 Sep 2018, 06:25 AM
Hello, Hưởng,

Thank you for giving the Kendo UI Chart a test run.

It is possible to change the colour of the Kendo UI Chart crosshair dynamically by assigning a new colour to the option and calling the refresh() method of the chart. Here is a sample runnable example I created for your convenience:

https://dojo.telerik.com/@bubblemaster/IPeWogIm

chart.options.valueAxis.crosshair.color = "red";
chart.refresh();

Alternatively, the setOptions() method could be used.

Let me know if further assistance is required.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Charts
Asked by
Hưởng
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or