SfChart pie chart showing wrong sector color

I'm not sure if this is a bug or if I'm missing something but in some cases, the wrong sector color is represented on the pie chart. Changing the StartAngle and the EndAngle on the pie series may correct the issue but the problem occur again with different data set. 

In the attached screenshot, the yellow sector is supposed to be green ("Normal"). Note that the labels (using the default background color) are showing the correct background colors. I'm using custom color palette for the pie series in this case but even with the default color palette being used, the issue is still there. The SfChart version being used is 15.4.0.17.

Pie chart series data (using default StartAngle and EndAngle):
"Normal", 2
"Elevated", 0
"Stage 1", 3
"Stage 2", 1
"Crisis", 0

Thank you.


Attachment: PieChartScreenshot_a3c16441.zip

5 Replies

DV Divya Venkatesan Syncfusion Team January 3, 2018 12:35 PM UTC

Hi Jason,

We have created a sample with the provided data and tested with the following scenarios. The segment color is displayed properly.

Scenarios:

1. Added data in load time.
2. Adding and Removing data dynamically.
3.Changing whole ItemsSource dynamically.
4. Adding data after a delay.

We have the sample for you reference which can be downloaded from the following link.

Sample: http://www.syncfusion.com/downloads/support/forum/135220/ze/PieChartSample-1166234514

Could you please check if you have configured anything else apart from our confirmations for data marker and pie series in your application?

Regards,
Divya Venkatesan
 



JO Jason Ong January 3, 2018 03:49 PM UTC

Hi Divya,

Thank you. I have built and tested the reference sample and it worked properly on my Android 6.0 (API 23) device. I noticed that the reference sample uses PCL project and Xamarin.Forms 2.4.

However, my current project is using .NET Standard and Xamarin.Forms 2.5.

As a test, I created a new blank VS 2017 solution (.NET Standard 2.0, XF 2.5.0.121934, SfChart 15.4.0.20) and copied over the relevant code from the reference sample. This time, the pie chart displayed the wrong sector color on the same Android 6.0 device. I have attached the solution for your investigation.

Thanks again.




Attachment: TestChart_bd2bddac.zip


DV Divya Venkatesan Syncfusion Team January 7, 2018 08:28 AM UTC

Hi Jason, 
  
We have attached the screenshot on running the provided sample. The segment color is displayed properly.

 
  
Could you please recheck at your side and send us the replication procedure if you still face the issue? 
  
Regards, 
Divya Venkatesan 



JO Jason Ong January 7, 2018 12:13 PM UTC

Hi Divya,

After compiling the sample for Release, the sector color rendered properly on Android M (actual device, non-rooted).

It seems the problem appears under following observed conditions:
1. Debug build (using default configuration i.e. Shared Runtime enabled)
2. Xamarin.Forms 2.5 using .NET Standard project 
3. Android M (though I haven't tested on Android L, N or Android O)
4. Pie chart has 0 value in one or more sectors

With the above conditions, after turning off Shared Runtime in the Android project properties, the problem went away.

Since Release mode configuration works well, I think this is a non-issue now -- though the default Debug mode configuration quirk is worth noting.

Anyway, thanks so much for the support.

Jason


DV Divya Venkatesan Syncfusion Team January 8, 2018 10:04 AM UTC

Hi Jason,

Thank you for your update. We will check and fix this bug internally.

Please let us know if you need any other assistance.

Regards,
Divya Venkatesan

Loader.
Up arrow icon