Dynamic color for categoryAxis.crosshair

2 posts, 0 answers
  1. Hưởng
    Hưởng avatar
    1 posts
    Member since:
    Sep 2018

    Posted 24 Sep Link to this post

    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

  2. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    500 posts

    Posted 26 Sep Link to this post

    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.
Back to Top