Telerik Reporting Map Colorpalette & Legend

2 Answers 88 Views
Miscellaneous
Yemo
Top achievements
Rank 1
Iron
Yemo asked on 15 Aug 2022, 05:47 PM

Hello,

the Telerik Reporting Map (as a choropleth) seems to work well with Gradient colors and a rangemin/rangemax.

But there seems to be an issue with trying to use it (as a choropleth) with a defined Colorpalette of a fixed number of colors. the map only seems to pick up only two colors despite the number of colorts defined in the palette and the setting of the map colorscount property.

Also, is there a way in order to specify the distinct categories for the legend  if not using a Rangemin/Rangemax?

Thanks

2 Answers, 1 is accepted

Sort by
0
Yemo
Top achievements
Rank 1
Iron
answered on 16 Aug 2022, 04:12 PM

Ok. In case i am missing something, attaching a report sample to try and illustrate the above point.

The sample report attached in the zip file shows a map of Africa.

The accompanying data.csv file lists all the countries in Africa , and has a single column, geocolor, which is a value to color code each respective country one of the three colors specified in the report's colorpalette.

Hence the assumption is since that the data values are only one of three colors, each country will be color coded one of the three colors according to the color palette, but only one country (S7udan) gets a color and shows up in the legend.

Grateful for any comments in case I have missed something simple.

Thanks

Dimitar
Telerik team
commented on 18 Aug 2022, 02:48 PM

Thank you for the attached report!

Basically, you need to change the Map.Series.ColorData expression to = Fields.ADM0_CODE, and the Category group should also be the code field. Then, change the Series grouping field to the Geocolor field so that there are as many colors used from the color palette, as the Geocolor values.

For more information, please see the How to Setup a Choropleth Using the Map Wizard article.

Yemo
Top achievements
Rank 1
Iron
commented on 20 Aug 2022, 10:37 AM

Ok. Thanks for clarifying this. But in this scenario, the groupings are therefore by each Geocolor as required. How would you customize the legend to relect the distinct geocolor values?

More importantly, if there is a one to one relationship between distinct geocolor fields and another fields describing each color (ie Low, medium, High), how would it be possible to reflect the geocolor colors and descriptive field in the legend?

Many thanks

 

 

Dimitar
Telerik team
commented on 24 Aug 2022, 12:40 PM

For this case, you can hide the Map legend, and instead, you may use the List and Shape report items to create a "fake" legend.

Essentially, you can use the map data as DataSource for the List, in which you may display a square shape where the background color of the shape is set through a binding or conditional formatting. This way, you can mimic the map legend unnoticeably.

0
Douglas
Top achievements
Rank 1
answered on 29 Mar 2023, 11:59 AM
It sounds like you're having an issue using a defined color palette with a choropleth map, where the map is only picking up two colors despite the number of colors defined in the palette and the setting of the map's colorsCount property. There could be various reasons why this is happening, but here are a few things you can consider troubleshooting:
Make sure that the palette is being properly defined and passed to the choropleth map. Check that the correct references are being used and that the palette is being applied to the correct elements.
Tags
Miscellaneous
Asked by
Yemo
Top achievements
Rank 1
Iron
Answers by
Yemo
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 1
Share this question
or