valueExpressionTitle not working

479
5
Jump to solution
06-28-2021 12:20 PM
JayHill
Occasional Contributor II

I'm trying to add labels to both the uniqueValues and the visualVariable parts of my legend.  The valueExpressionTitle = "Title" property is not working for me. 

 

Link to codepen

0 Kudos
1 Solution

Accepted Solutions
JayHill
Occasional Contributor II

Ken

Figured it out. 

Had this up in the css.

.esri-legend__layer-caption {
display: none;
}

 

I got ride of that css and I have them showing up now with this code.

          legendOptions: {
                  title: "Commodity Type"
              },

View solution in original post

5 Replies
KenBuja
MVP Honored Contributor

A quick glance shows a problem with the agreement with your require modules and your function arguments. They get out of sequence after CalciteMapsArcGIS. I don't know if this affects the visualVariables, but you should fix this first.

0 Kudos
JayHill
Occasional Contributor II

Thanks Ken

I believe I fixed it but no luck getting the valueExpressionTitle working.

0 Kudos
KenBuja
MVP Honored Contributor

Can you provide a shorter example that highlights just the problem?

0 Kudos
JayHill
Occasional Contributor II

Should be shorter now. The valueExpressionTitle (line 837), as I understand it, should provide a title to the visual variable (size) in the legend correct?  Ultimately I'm trying to label the two different ways the umosRenderer (line 633) is displayed in the legend. One title for the colored uniqueValues and one title for the size.

0 Kudos
JayHill
Occasional Contributor II

Ken

Figured it out. 

Had this up in the css.

.esri-legend__layer-caption {
display: none;
}

 

I got ride of that css and I have them showing up now with this code.

          legendOptions: {
                  title: "Commodity Type"
              },