I'm looking into how to add third-party library chart to Experience Builder as a widget. I've tested with d3 library chart sample code (arcgis-experience-builder-sdk-resources/widgets at master · Esri/arcgis-experience-builder-sdk-resou...) with static input as in the example.
What I would eventually like to have is following.
App with a map widget, configure filter data records action on map widget, use map widget's data source as input to d3 library chart so that when map view changes then third-party chart data also changes.
I've tried looking into other widgets sample code like "listen selection change of a data source" (arcgis-experience-builder-sdk-resources/widgets at master · Esri/arcgis-experience-builder-sdk-resou...) and how these get input data from data source but haven't figured out a way to do that with d3 chart.
Has anyone tried to do similar solution and can nudge me in the right direction on how to use data source with third-party library charts?
The most common way to access data is to use the DataSourceComponent. With this component, you can get the DataRecords, then you can pass the data to the d3.