Custom palette breaks XAML previewer

5 posts, 0 answers
  1. Nick
    Nick avatar
    3 posts
    Member since:
    Jan 2019

    Posted 16 Jan Link to this post

    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>

     

  2. Nick
    Nick avatar
    3 posts
    Member since:
    Jan 2019

    Posted 16 Jan in reply to Nick Link to this post

    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").

     

     

  3. Yana
    Admin
    Yana avatar
    4916 posts

    Posted 18 Jan Link to this post

    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
  4. Nick
    Nick avatar
    3 posts
    Member since:
    Jan 2019

    Posted 18 Jan in reply to Yana Link to this post

    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.

     

     

  5. Yana
    Admin
    Yana avatar
    4916 posts

    Posted 22 Jan Link to this post

    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
Back to Top