We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfCharts not rendering

Thread ID:

Created:

Updated:

Platform:

Replies:

123853 Apr 27,2016 03:13 AM UTC Apr 29,2016 05:47 AM UTC Xamarin.Forms 4
loading
Tags: SfChart
Jacob Miller
Asked On April 27, 2016 03:13 AM UTC

Hey,
I'm trying to get a chart to render in my xamarin pcl app but I can;t seem to get it to work.
I've installed SfChart.Xforms via nuget package and my xaml page looks like this:
xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="CrossPlatformApp.ChartPage">
however when i try to run the application it just returns a completely blank page. What can i do to try and get a chart to render?

Jacob Miller
Replied On April 27, 2016 03:20 AM UTC

Sorry I didn't paste the code in properly
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 
xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
x:Class="MortgageCalculator.Chart">
<ContentPage.Content>

<chart:SfChart HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" IsVisible="true" IsEnabled="true">
   <chart:SfChart.Title>
        <chart:ChartTitle Text="Weather Analysis"/>  
  </chart:SfChart.Title>

   <chart:SfChart.PrimaryAxis>
       <chart:CategoryAxis>
            <chart:CategoryAxis.Title>
                <chart:ChartAxisTitle Text="Month"/>
            </chart:CategoryAxis.Title>
       </chart:CategoryAxis>
   </chart:SfChart.PrimaryAxis>

   <chart:SfChart.SecondaryAxis>
       <chart:NumericalAxis>
           <chart:NumericalAxis.Title>
               <chart:ChartAxisTitle Text="Month"/>
           </chart:NumericalAxis.Title>
       </chart:NumericalAxis>
   </chart:SfChart.SecondaryAxis>

</chart:SfChart>

</ContentPage.Content>
</ContentPage>

Gobi M [Syncfusion]
Replied On April 27, 2016 11:20 AM UTC

Hi Jacob, 
  
Thanks for using Syncfusion products. 
  
We have prepared a chart sample for your reference and it can be downloaded in below link. We suggest you to follow our online UG for getting started with SfChart, which can be accessible in below link.  
  
Sample: ChartSample 
  
  
Regards, 
Gobi M 


Jacob Miller
Replied On April 29, 2016 01:11 AM UTC

Thanks for the quick reply,

In that example the chart is being written in c# and I'm looking to build it in xaml as that's how the rest of my app is already built. Do you have a charts example that has the chart coded in xaml as opposed to c#? as when i followed the tutorial that you linked I was still getting the issue of no chart rendering and I can't seem to find the issue as it is compiling with no errors.

Thanks,

Jacob 

Gobi M [Syncfusion]
Replied On April 29, 2016 05:47 AM UTC

Hi Jacob, 
 
We have prepared a chart sample using xaml for your reference and it is available for download in the following link. Also make sure that you have added SfChartRenderer in your sample as suggested in document that is necessary to render the chart in view.  
 
 
If the issue still exists, could you please modify the attached sample to reproduce the issue? It will be helpful for us to analyze further and provide you a possible solution. 
 
Regards, 
Gobi M 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;