[Xamarin.Forms] Series.Marks.Font.Color issue

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
MiracleTek
Newbie
Newbie
Posts: 9
Joined: Mon Jan 12, 2015 12:00 am

[Xamarin.Forms] Series.Marks.Font.Color issue

Post by MiracleTek » Mon Jan 26, 2015 2:54 pm

Hi There,

We've got a problem with Xamarin.Forms version of TeeCharts. There seems to be some discrepancy in the way series marks font color is rendered. It seems to set the series marks colors randomly.

I've attached a sample project and a screenshot.

According to the code, whenever a pie chart is rendered, its Marks.Font.Color should be Green, and when a bar chart is rendered, its Marks.Font.Color should be White. But it seems to randomly generate the color of the marks.

Do you know what we might be doing wrong?

Thanks.
Attachments
TeeChartsSample.zip
Sample project
(284.81 KiB) Downloaded 585 times
Nexus 4 (KitKat) Screentshot 8.png
Font color issue screenshot
Nexus 4 (KitKat) Screentshot 8.png (77.43 KiB) Viewed 8491 times

MiracleTek
Newbie
Newbie
Posts: 9
Joined: Mon Jan 12, 2015 12:00 am

Re: [Xamarin.Forms] Series.Marks.Font.Color issue

Post by MiracleTek » Mon Jan 26, 2015 2:56 pm

I suspect this is somehow related to the font size may be TeeCharts is caching font objects of the same size (or something) and thus caching their colors too. But I am not sure. This is just a hunch.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: [Xamarin.Forms] Series.Marks.Font.Color issue

Post by Narcís » Mon Jan 26, 2015 3:00 pm

Hello,

Does setting:

Code: Select all

Steema.TeeChart.Utils.UseCaches = false;
makes any change at your end? That being the case it would be a caching bug. The problem is in Android only or it affects other platforms as well?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

MiracleTek
Newbie
Newbie
Posts: 9
Joined: Mon Jan 12, 2015 12:00 am

Re: [Xamarin.Forms] Series.Marks.Font.Color issue

Post by MiracleTek » Tue Jan 27, 2015 6:26 am

Hi Narcis,

The issue appears to be affect Android only. And the code you provided seems to fix the issue. So it may really be a caching issue.

We're using it as a workaround for now but I guess you wouldn't recommend that in the long run. Correct?

Thanks you so much for the prompt response.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: [Xamarin.Forms] Series.Marks.Font.Color issue

Post by Narcís » Tue Jan 27, 2015 12:24 pm

Hello MiracleTek,
MiracleTek wrote: So it may really be a caching issue.
Yes, it is. We have enhanced the problem as font color was not being considered when caching the font object. However, this will still fail under some circumstances due to a Xamarin.Forms bug (26455), which I just submitted to Xamarin's bugzilla.
MiracleTek wrote:The issue appears to be affect Android only.
It only affects Android because caching is done in different ways across each platform.
MiracleTek wrote: We're using it as a workaround for now but I guess you wouldn't recommend that in the long run. Correct?
The purpose of object caching is speeding up the chart rendering and its responsiveness, specially in Android. If performance is not a problem with the nature of your application then you can safely disable caching.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply