So I love this great sample with the slider: Generate univariate continuous size and color visualization in 3D | ArcGIS API for JavaScript 4.2 and I want to do something just like this but instead using a simple schools wpoint FeatureLayer with number of students instead of cities with population like the sample shows.
So I add in my code essentially based just like the sample code but just switching out for my schools FeatureLayer. I then get this error: there was an error: d {name: "size-visual-variable:insufficient-info", message: "Unable to find size scheme", details: undefined}.
Turns out I need to set up my visualVariables (and statistics too) inside the colorAndSizeRendererCreator.createContinuousRenderer(params):
<SPAN class="keyword token">var</SPAN> sizeVV <SPAN class="operator token">=</SPAN> response<SPAN class="punctuation token">.</SPAN>size<SPAN class="punctuation token">.</SPAN>visualVariable<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> colorVV <SPAN class="operator token">=</SPAN> response<SPAN class="punctuation token">.</SPAN>color<SPAN class="punctuation token">.</SPAN>visualVariable<SPAN class="punctuation token">;</SPAN>
sliderParams<SPAN class="punctuation token">.</SPAN>statistics <SPAN class="operator token">=</SPAN> response<SPAN class="punctuation token">.</SPAN>statistics<SPAN class="punctuation token">;</SPAN>
sliderParams<SPAN class="punctuation token">.</SPAN>visualVariables <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN>sizeVV<SPAN class="punctuation token">,</SPAN> colorVV<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Turns out the FetureLayer in the sample has this all set up with "Drawing Info" in the FeatureLayer's service:
https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/Enriched%20World%20Cities/FeatureServer/0 .
So how do I set up these important statistics and visualVariables for my schools FeatureLayer by JS code. The snippets below the map in this sample page (Generate univariate continuous size and color visualization in 3D | ArcGIS API for JavaScript 4.2 ) are quite confusing.
Is this refereing to the assigned renderer in my renderer: property in my FeatureLayer?
// set the renderer to the layer povLyr.renderer = response.renderer;
Ande where exacttly atre these sizeVV and colorVV coming from? They are not set up in my rendere.
visualVariables: [ sizeVV, colorVV ]?
// size/color visual variables returned from createContinuousRenderer(),
There must be a straightforward code example to set up a common slider scenario with size, color, field max/min values, etc. The set-up for the Thematic multivariate 3D visualization shows very well the symbolization syntax (Thematic multivariate visualization (3D) | ArcGIS API for JavaScript 4.2 ) for this slide example I'm pretty lost.
Any help is very much appreciated.
Much Thanks,
David