cedar icon indicating copy to clipboard operation
cedar copied to clipboard

Colors - Match Map Layer Symbolization

Open gavinr opened this issue 8 years ago • 1 comments

When working with customers, a common request I get is to have the colors of a graph (most typically this happens with a pie chart but could be with any type I suppose) match the symbolization of the features on the web map that the pie piece represents. (https://community.esri.com/ideas/5989 as an example of these types of requests)

gavinr avatar Jan 16 '18 15:01 gavinr

Thanks @gavinr

#382 will allow setting a styles.colors property which is an array of colors (strings) that corresponds to the series, so in theory, what your would need to do is read colors out of a layer renderer and put them into an array in the same order as the series.

I agree that cedar should make this easier, like maybe being able to assign style.colors to a uniqueValueInfos and cedar would figure out how to map that to the series for you (just spitballin' here).

I think the first step would be to add an example page to the non-existent docs site that demonstrates how you might achieve this today w/ a couple different types of renderers and identify the patterns that can be turned into an API.

tomwayson avatar Jan 18 '18 15:01 tomwayson