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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Stacked Bar Chart - two adjustments

Thread ID:

Created:

Updated:

Platform:

Replies:

129746 Mar 31,2017 03:57 PM UTC Apr 10,2017 12:27 PM UTC Xamarin.Forms 6
loading
Tags: SfChart
Michal Staszewski
Asked On March 31, 2017 03:57 PM UTC


Hello,

I need to adjust a couple of things on the chart above and I'm out of ideas.

First of all - I want the values to be displayed on markers as well as on axis labels converter into percentage. I've tried using the LabelContent property in ChartDataMarker however it does something weird with the numbers --> instead of -0.43 & -0.22 it displays minus infinity % & instead of 0.04 & 0.15 it displays 20.66% & 79.34% so what it does - it gives a percentage value of the element against series total & what I want is simply convert the doubles to percentage display. However I can't seem to find a proper place to attach the converter. This should change the labels display on axis as well.

Second thing - the transition point between the two series on the stacked bar is always at 0.00 - I need to change it into a specified value & what's more - display a marker with that value somewhere on the bar where it is supposed to be.

So the final output would be like that:

percentage values on axis labels
percentage values on data markers
stacked bar red from - 0.43 to X; green from X to +0.04; X value displayed in a marker on X position on a bar in a specified color.

Is it possible? 

Regards,
Michał

Michal Staszewski
Replied On April 3, 2017 04:40 PM UTC

up ^

Parthiban Sundaram [Syncfusion]
Replied On April 5, 2017 03:08 PM UTC

Hi Michal,

Thanks for using Syncfusion products.

We have achieved your requirement using RangeColumnSeries with AxisLabelCreated and DataMarkerLabelCreated(platform specific) events. Please download the sample from following location.

Sample: http://www.syncfusion.com/downloads/support/forum/129746/ze/SimpleSample-545375495  

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

Regards,
Parthiban S
 


Michal Staszewski
Replied On April 6, 2017 05:37 PM UTC

Hi Michal,

Thanks for using Syncfusion products.

We have achieved your requirement using RangeColumnSeries with AxisLabelCreated and DataMarkerLabelCreated(platform specific) events. Please download the sample from following location.

Sample: http://www.syncfusion.com/downloads/support/forum/129746/ze/SimpleSample-545375495  

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

Regards,
Parthiban S
 


that's great. Exactly what I was looking for.

Although... is there a possibility for the chart to display the label for the number in the middle only once? I mean those -22% & -11% which repeat themselves in the middle



Parthiban Sundaram [Syncfusion]
Replied On April 7, 2017 04:01 PM UTC

Hi Michal,

Thanks for the update,

We have modified the sample based on your requirement using the following code snippet. Please download the sample from following location.

Code snippet:
 
  
 
series1.DataMarker.LabelStyle.LabelPosition = DataMarkerLabelPosition.Center;        series2.DataMarker.LabelStyle.LabelPosition = DataMarkerLabelPosition.Center; 
 
 
Please let us know, if you need further assistance on this.

Regards,
Parthiban S
 


Michal Staszewski
Replied On April 7, 2017 06:24 PM UTC

Hi Michal,

Thanks for the update,

We have modified the sample based on your requirement using the following code snippet. Please download the sample from following location.

Code snippet:
 
  
 
series1.DataMarker.LabelStyle.LabelPosition = DataMarkerLabelPosition.Center;        series2.DataMarker.LabelStyle.LabelPosition = DataMarkerLabelPosition.Center; 
 
 
Please let us know, if you need further assistance on this.

Regards,
Parthiban S
 


yeah, that's what I invented myself. But it's a bit of a cheat-around because those two labels are still over there in the middle, just on top of each other :)

Saravana Pandian Murugan [Syncfusion]
Replied On April 10, 2017 12:27 PM UTC

Hi Michal,

Thanks for the update.

Currently this is the most efficient way to achieve this requirement. Please get back to us if you are facing any issues with this.

Regards,
Saravana Pandian M.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;