AnsweredAssumed Answered

Is it possible to do UniqueValueRenderer with 2 value fields

Question asked by ctsurveyors on Jan 12, 2015
Latest reply on Jan 13, 2015 by dbroux-esristaff

I want to define symbology based on values from two attribute fields, Is this possible since it asks for an observable collection of fields??


I tried something similair to below with no luck..


// create new UniqueValueInfos: provide attribute value (food type) and symbol to use
var info1 = new Esri.ArcGISRuntime.Symbology.UniqueValueInfo("Chinese", chineseSym);
var info2 = new Esri.ArcGISRuntime.Symbology.UniqueValueInfo("American", americanSym);
var info3 = new Esri.ArcGISRuntime.Symbology.UniqueValueInfo("Italian", italianSym);

var info3 = new Esri.ArcGISRuntime.Symbology.UniqueValueInfo("8.5", circleSym);

// create a UniqueValueCollection and add the unique value infos
var uniqueInfos = new Esri.ArcGISRuntime.Symbology.UniqueValueInfoCollection();

// create a UniqueValueRenderer: specify the attribute field to render with ("FoodStyle")
var uniqueRenderer = new Esri.ArcGISRuntime.Symbology.UniqueValueRenderer();
uniqueRenderer.Fields = new System.Collections.ObjectModel.ObservableCollection<string>(new[] { "FoodStyle" , "Rating"});