AnsweredAssumed Answered

add class / data-attribute to graphic dom node 4.x

Question asked by bflessner on May 1, 2017
Latest reply on May 1, 2017 by bflessner

I'm looking for a way to change the style of certain graphics based on user interaction. I have a bar chart in my application and when the user hovers over, for example, the 2015 bar, I want to highlight all the points on the map that occurred in 2015. I thought the best way to do this would be to add a data-year attribute to the graphic's dom node and use some CSS similar to Styling SVG with CSS | Guide | ArcGIS API for JavaScript 3.20.  But I see in Functionality matrix | ArcGIS API for JavaScript 4.3  that the dataAttributes method is "Not planned". Is there a way to do this at 4.x? 

 

Classes and CSS styling is used at 4.3 here: https://github.com/nickcam/FlareClusterLayer so it seems like it should be possible.

Outcomes