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.
Unfortunately, activation email could not send to your email. Please try again.

Chart not rendering in MVC3 Razor enabled application

Thread ID:

Created:

Updated:

Platform:

Replies:

103775 May 30,2012 08:07 AM May 31,2012 03:14 AM ASP.NET MVC (Classic) 1
loading
Tags: Chart
Sanjay
Asked On May 30, 2012 08:07 AM

Hi,
 
In  MVC3 View, I have code copied from sample to render a chart:
 
@(Html.Syncfusion().ChartAdv("ChartAdv")             
              .Series(series =>
              {
                  Random ran = new Random();
                  series.Add().Name("John").Type(SeriesType.Spline).Points(p =>
                  {
                      for (int i = 1; i <= 70; i++)
                      {
                          p.Add(i, ran.Next(10, 60));
                      }
                  }).Style(style =>
                  {
                      style.Border(border => border.Width(0)).Opacity(0);
                  }).DisplayText(false).Symbol(symbol => symbol.Visible(true).Shape(SymbolShape.Circle));
                  series.Add().Name("Peter").Type(SeriesType.Spline).Points(p =>
                  {
                     
                      for (int i = 1; i <= 70; i++)
                      {
                          p.Add(i, ran.Next(10, 60));
                      }
                  }).Style(style =>
                  {
                      style.Border(border => border.Width(0)).Opacity(0);
                  }).DisplayText(false).Symbol(symbol => symbol.Visible(true).Shape(SymbolShape.Circle));
              
              }).Size(new System.Drawing.Size(900, 500)).Text("Monthly Savings").Font(new Syncfusion.Mvc.ChartAdv.ChartFont("Arial", "15px", ChartFontStyle.Bold)).Legend(legend => legend.Visible(true).Shape(LegendShape.Circle)).ElementSpacing(10)
            
  )
 
In _Layout.cshtml i have below code:
Header section

@{ Html.Syncfusion().StyleManager()
        .Register(styleSheet =>
            {
                styleSheet.Add(ComponentType.Chart);

            }).Render();  }

 

After Page Body

 @{ Html.Syncfusion().ScriptManager().Render();}

 

Apart from that I have added all dll and js file references as mentioned in the the documentation.

When i run the app, i get nothing rendered.

Please help


Vijayabharathi K [Syncfusion]
Replied On May 31, 2012 03:14 AM

Hi Sanjay,

 

Thanks for using Syncfusion products.

 

We have attached a simple razor HTML5 chart sample in v10.2. Also, the following browser versions are supporting HTML5 Chart control.


1.Internet Explorer 9
2. Mozilla 3.5+
3. Safari 5+
4. Opera 10.53+
5. Chrome 10+
We can run the Chart HTML5 sample and online samples in the above browser versions.

 

We have provided same sample in Forum:103773 for HTML5 chart .

 

Please let us know if you have any concerns.

 

Regards,

Vijayabharathi            



MvcRazorApplication_9c9cf105.zip

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.

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.

;