Languages

Menu
Sites
Language
How to use Microcharts in Tizen

Hi Folks,

     I tried to implemet Charts in Tizen .NET mobile app but it's not working, Could any one help me out with below code and references,

My Code : C#

using Microcharts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using Entry = Microcharts.Entry;

namespace CrossTemplate1
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
	public partial class TabPage1 : ContentPage
	{
		public TabPage1 ()
		{
			InitializeComponent ();
            var entries = new[]
                        {
                            new Entry(212)
                             {
                                 Label = "UWP",
                                 ValueLabel = "212",
                                 Color = SkiaSharp.SKColor.Parse("#2c3e50")
                             },
                             new Entry(248)
                             {
                                 Label = "Android",
                                 ValueLabel = "248",
                                 Color = SkiaSharp.SKColor.Parse("#77d065")
                             },
                             new Entry(128)
                             {
                                 Label = "iOS",
                                 ValueLabel = "128",
                                 Color = SkiaSharp.SKColor.Parse("#b455b6")
                             },
                             new Entry(514)
                             {
                                 Label = "Shared",
                                 ValueLabel = "514",
                                 Color = SkiaSharp.SKColor.Parse("#3498db")
                            }
                        };

            chartView.Chart = new RadarChart() { Entries = entries };
        }
    }
}

View : XAML

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="CrossTemplate1.TabPage1"
             xmlns:local ="clr-namespace:CrossTemplate1"
             xmlns:microcharts="clr-namespace:Microcharts.Forms;assembly=Microcharts.Forms"
             Title="Page 1">
    <ContentPage.Content>
        <StackLayout HeightRequest="400">
            <!--<Label Text="Welcome to Xamarin.Forms!"
                VerticalOptions="CenterAndExpand" 
                HorizontalOptions="CenterAndExpand" />-->
            <microcharts:ChartView x:Name="chartView" />
        </StackLayout>
    </ContentPage.Content>
    
</ContentPage>

Followed references:

https://www.youtube.com/watch?v=tmymWdmf1y4 

and 

https://blog.xamarin.com/microcharts-elegant-cross-platform-charts-for-any-app/

 

Thanks in advance,

Vamsi K.

 

View Selected Answer

Responses

4 Replies
Mark as answer
Plamen Ivanov

ChartView is platform-specific and as I see (https://github.com/aloisdeniel/Microcharts/tree/master/Sources), there is no implementation (yet) for Tizen

 

This is more general problem, see here:

https://developer.tizen.org/forums/tizen-.net/xamarin-plugins-tizen.net-support

 

Plamen

Vamsi Konanki

Hi  Plamen Ivanov,

     Thanks  for the quick reply, and is there any alternative chart libs available for Tizen .Net .

 

 

 

Best regards,

Vamsi K

 

Plamen Ivanov

As I described in second link - Tizen.NET is new platform and I doubt you can find easily charting library supporting Tizen.NET.

But also in second link I stated which is right way - when you like/use some library just ask author to add Tizen support. This will increase library's popularity so author may be consider extending it to Tizen.

Even if you find another library, it may not suit you well.

Vamsi Konanki

Yes Plamen Ivanov, I agree with you, finally I raised an ticket to the author "https://github.com/aloisdeniel/Microcharts/issues/45"

waiting from the final answer.