Page 1 of 1

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

Posted: Mon Jan 26, 2015 2:54 pm
by 18271242
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.

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

Posted: Mon Jan 26, 2015 2:56 pm
by 18271242
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.

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

Posted: Mon Jan 26, 2015 3:00 pm
by narcis
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.

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

Posted: Tue Jan 27, 2015 6:26 am
by 18271242
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.

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

Posted: Tue Jan 27, 2015 12:24 pm
by narcis
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.