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.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jan 9, 2015 at 8:03

1 Answer 1

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.)

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
answered May 5, 2016 at 14:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.