I have a custom widget that allows the user to enter a query string and select a field to symbolize the selection set by unique value. I want to pass the unique field values/symbolization to the legend of a custom print layout template. The attached image represents an example of a selected field, unique values and their symbolization (This is what I'd like the legend to look like). This is what I would like to pass to a Legend element I have in my custom print layout template. I can pass text elements with no problem, just can't figure out how to pass a legend item. I'm using the print dijit and set the "templates" param to a variable that contains info pertaining to that specific layout. I see there is a "legendLayers": [], param within the layoutOptions; however, I can't seem to get this to work. As I mentioned, I'd like the legend to look like the attached image. Does anyone know if this is possible? Any help/suggestions would be greatly appreciated.
Thanks,
Doug