Using Dojox Charts in popups
Combining the dojox/charting modules with the ArcGIS API for JavaScript provides many ways to display data. One way to deliver feature data through charts is through the map's infoWindow. The infoWindow uses an HTML template for its content, and that can provide the hooks we need to attach our graphs.
One issue when adding graphs to the infoWindow is determining when to draw the graph. Thankfully, there's an event for that. The map's infoWindow fires a selection-changed event whenever the selected feature graphic is changed, either by clicking on another graphic, or by clicking on the next and previous buttons. We can assign an event listener to that event, look at the selected graphic and, if it has the data we need, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access