We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Chart Legend - DataMarkers LabelContent with the the Key and Value in an aligned vertical format?

I'm looking for a way to display the chart's DataMarkers on the same line with the key and value on the same line in a manner where the legend's items are in alignment.  (please see the attached picture with dark blue background for an illustration of what I'm looking for).

I've played around with the legends dockposition to bottom and the orientation to Vertical but the legend's datamarkers are clumped in the horizontal center of screen.  Additionally, you can only display one value in the markers (either the Key or the Value, but not both). 

I've tried entering a "combined" property in the LabelContent of a market that includes the Key and Value with spaces in between them but the marker values aren't aligned as the DataMarker's keys will have differing lengths.   Please see the image with the white background for this illustration.

I guess I could do additional proecessing to insert white space behind the datamarker Keys to ensure that the Keys always have a consistent length but this could tedious considering the possible varying lengths of the values.

Is there a better way to display the DataMarkers LabelContent with the the Key and Value in an aligned vertical format?


Attachment: DataMarkers_3f582a17.zip

3 Replies

PS Parthiban Sundaram Syncfusion Team January 3, 2017 02:22 PM UTC

Hi Lyndon,

Thanks for using Syncfusion products.

We have prepared the sample based on your requirement using custom layout instead of ChartLegend. Please download the sample from following location.

Sample: http://www.syncfusion.com/downloads/support/forum/128101/ze/SimpleSample282502572  

Please check and let us know if your requirement is different from this.

Regards,
Parthiban S
 



LH Lyndon Hughey January 3, 2017 09:21 PM UTC

That sample is EXACTLY what I was looking for.  Thanks for the quick followup.  You guys are awesome!


PN Preethi Nesakkan Gnanadurai Syncfusion Team January 4, 2017 04:39 AM UTC

Hi Lyndon,  
  
Thanks for the update. 
  
Please let us know if you need further assistance on this. 
  
Regards,  
Preethi 


Loader.
Live Chat Icon For mobile
Up arrow icon