2

I am try to print my map with legend to PDF format; however, the legend label in the PDF is saying Override 1 instead of the label I specified in class breaks.

There are other maps I can print successfully with the correct labels used and the only difference I can find between them is that the ClassBreaksRenderer constructor is called differently. While the maps that can successfully print with the legend label is passing string to the attributeField parameter like

var renderer = new ClassBreaksRenderer(null, 'break_column_name');
the one failed to print the legend label is passing a function to the parameter like
var renderer = new ClassBreaksRenderer(null, calculate_break);

I have searched the web and as someone suggested, looking at the JSON that sent to the print service, I found that that no information about the breaks (i.e. classBreakInfos) are sent to the service.

Does anyone know why it is the case and how can I fix it?

I am using the 3.10 API.

1

Based on this GeoNet thread it appears that this is a limitation of the print task API. The ESRI staff member there stated:

Unfortunately, i don't know how of a good way to work around this problem (other than ensuring that you have fields present in the data for values you need to render by.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.