Using ArcGIS JS API 4.x, I'm presenting a FeatureLayer, and want to customise the symbol used to render the features based on data that is not part of the layer, it's a completely separate not-ArcGIS data source.
More specifically, I have a feature layer on ArcGIS server, and the only object attribute saved on that layer is the unique ID for features. Those unique IDs are referenceed in a completely different data storage, which has the detail of what symbol I want to display. I can access that separate data storage client-side with JS, but I don't know how to "combine" the two sources of data.
I've looked at the option of subclassing SimpleRenderer, but I've been drawing a blank there as I can't figure out what functions I'd need to override that can let me specify a different symbol based on the unique ID of the feature. I might be missing something?
Alternatively, I wonder whether I could do some sort of client-side combining of the FeatureLayer along with the separate data source, and then use visualVariables in the SimpleRenderer. Whether that would require subclassing FeatureLayer, or there's some other way to combine data sources, I don't know.