Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
255
Fill Color on Hover
posted

How can I change the fill color of a shape when it is hovered over?

  • 8421
    Suggested Answer
    posted

    Hello,

    This is possible through the use of the seriesMouseMove event. In here you'll want to store a value that allows you to identify which item was hovered over and then tell the map to rerender through the use of the renderSeries method. Next, you'll want to modify the shapeStyleSelector.selectStyle function to check if an item has been hovered and if so change the brush.

    I've modified one of our samples on jsFiddle to demonstrate this approach:

    http://jsfiddle.net/t6b2Ldh6/

    Please let me know if you have any questions or concerns about this implementation.