This is a migrated thread and some comments may be shown as answers.

Custom palette breaks XAML previewer

4 Answers 70 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 16 Jan 2019, 12:22 PM

If I add the following code into the .xaml file, it works fine on the device but prevents the previewer from displaying (see attached png for error).

Is there a way around this? I'd rather not have to build every time I want to see how my page is looking.

<telerikChart:RadPieChart.Palette>
    <telerikChart:ChartPalette>
        <telerikChart:ChartPalette.Entries>
            <telerikChart:PaletteEntry FillColor="#EF694D" />
            <telerikChart:PaletteEntry FillColor="#AAEF4D" />
            <telerikChart:PaletteEntry FillColor="#76D0F1" />
            <telerikChart:PaletteEntry FillColor="#E98AE2" />
            <telerikChart:PaletteEntry FillColor="#E9C18A" />
            <telerikChart:PaletteEntry FillColor="#E2E98A" />
        </telerikChart:ChartPalette.Entries>
    </telerikChart:ChartPalette>
</telerikChart:RadPieChart.Palette>

 

4 Answers, 1 is accepted

Sort by
0
Nick
Top achievements
Rank 1
answered on 16 Jan 2019, 12:46 PM

Using a custom palette also seems to increase the stroke width between pie segments.See attached files for default palette and custom palette (same as above but with strokeColor="White").

 

 

0
Yana
Telerik team
answered on 18 Jan 2019, 01:07 PM
Hello Nick,

Thank you for sending the screenshots.

First, regarding previewer - there are currently no controls that use platform renderers that work with Live Player (which is just about all custom controls and 3rd party components).  Due to the way the Live Player currently works, there's nothing they can do to change that, it would take a completely different kind of tool. 

I could suggest you try the other solution Microsoft released: Live Reload. Telerik UI for Xamarin works with Live Reload. 


As to the issue you've reported with PieChart - indeed, I have observed the erroneous behavior, it seems the colors are not mapped properly to the Android Chart. I have logged a bug report on your behalf, please check it at the link below:
https://feedback.telerik.com/xamarin/1383731-chart-android-colors-are-nor-applied-correctly-in-piechart-when-custom-chartpalette-is-used

You can also find your telerik points updated for the report.

I have managed to work-around the issue through a custom renderer, please download the attached project and give it a try.

I hope this would be helpful. Let me know if you have any additional questions on RadChart control.

Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Nick
Top achievements
Rank 1
answered on 18 Jan 2019, 04:45 PM

Yana,

Thanks for the reply. Just to clarify, I'm not talking about Live Player, I acknowledge that will only work with the most basic of apps. I am talking about the XAML previewer that appears in Visual Studio alongside your XAML code, and lets you see your layout as you edit, without having to build for device.

 

 

0
Yana
Telerik team
answered on 22 Jan 2019, 01:26 PM
Hello Nick,

I am sorry for my confusion.

Currently, the case with XAML previewer is similar - it is not suitable for controls that rely on custom native renderers, so the components from the Telerik UI for Xamarin will simply not work with it.

Let me know if I can help with anything else.

Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Nick
Top achievements
Rank 1
Answers by
Nick
Top achievements
Rank 1
Yana
Telerik team
Share this question
or