Piechart, Doughnut Chart.. value titles do not appear.

Hi,

PieChart and  Doughnut chart I try the examples, the graphics come, but the titles and writings are not visible.

Use XML;

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:ChartExample"
             xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms"
             x:Class="ChartExample.MainPage">
    <ContentPage.BindingContext>
        <local:ViewModel/>
    </ContentPage.BindingContext>
    <chart:SfChart>
        <chart:SfChart.Series>
            <chart:PieSeries ItemsSource="{Binding Data}" XBindingPath="Month" YBindingPath="Target"/>
        </chart:SfChart.Series>
    </chart:SfChart>
</ContentPage>
--------------------------------------------------------------------------------------------------------------------------------------------

Use Data Model ;
    public class ViewModel
    {
        public ObservableCollection<Model> Data { get; set; }
        public ViewModel()
        {
            Data = new ObservableCollection<Model>()
        {
            new Model("Jan", 10),
            new Model("Feb", 7),
            new Model("Mar", 6),
            new Model("Apr", 5),
            new Model("May", 4),
        };
        }
    }
    public class Model
    {
        public string Month { get; set; }
        public double Target { get; set; }
        public Model(string xValue, double yValue)
        {
            Month = xValue;
            Target = yValue;
        }
    }
------------------------------------------------------------------------------------------------



Attachment: WhatsApp_Image_20200511_at_22.11.19_(1)_c7760b70.rar

3 Replies

DD Devakumar Dhanapoosanam Syncfusion Team May 12, 2020 06:10 AM UTC

Hi Hamit, 
 
Greetings from Syncfusion. 
 
We have analyzed your query and we would like to let you know that we can show the chart value by using the DataMarker property of the chart series as per in below code snippet, 
 
XAML: 
<chart:PieSeries ItemsSource="{Binding Data}" XBindingPath="Month" YBindingPath="Target"> 
      <chart:PieSeries.DataMarker> 
             <chart:ChartDataMarker/> 
      </chart:PieSeries.DataMarker> 
</chart:PieSeries> 
 
Please refer the below help document for more details, 
 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Devakumar D 



HA hamit May 12, 2020 08:26 AM UTC

Hello there,
Thank you so much. I solved the problem.
But I could not find a complete example in the document, this misled me.
https://help.syncfusion.com/xamarin/charts/charttypes#pie-chart
But I had to look at the beginning of the document, I realized that. I also learned other features (Title, PrimaryAxis, SecondaryAxis, ChartBehaviors ..)👌😎
the latest situation is attached

Attachment: testChart_866e8b47.rar


SJ Suyamburaja Jayakumar Syncfusion Team May 13, 2020 05:43 AM UTC

Hi hamit,  
  
We are glad to hear that your requirement has been achieved.  
  
Please let us know if you need any further assistance on this.  
  
Regards,  
Suyamburaja J.  


Loader.
Up arrow icon