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. Image for the cookie policy date
close icon

Display charts in the spreadsheet control?

Online documentation mentions that the spreadsheet control supports various data visualizations including charts. However, opening an existing excel file with charts fails to display the charts and instead shows a null reference exception. I have also tried creating a chart grammatically using the IChartShape, but to no avail.

Is there any way to display charts in the sfspreadsheet? 

1 Reply

KB Kanimozhi Bharathi Syncfusion Team September 8, 2016 12:06 PM UTC

Hi Travis Chambers, 
 
Thank you for contacting Syncfusion Support. 
 
Please find the below details 
 
QUERY 
RESPONSE 
Online documentation mentions that the spreadsheet control supports various data visualizations including charts. However, opening an existing excel file with charts fails to display the charts and instead shows a null reference exception. I have also tried creating a chart grammatically using the IChartShape, but to no avail 
To import chart into Spreadsheet, you need to add “ Syncfusion.SpreadsheetHelper.Windows.dll” assembly as reference and create an instance of Syncfusion.Windows.Forms.SpreadsheetHelper.GraphicChartCellRenderer and add that renderer into GraphicCellRenderers  collection by using the helper method AddGraphicChartCellRenderer which is available under the namespace “Syncfusion.Windows.Forms.Spreadsheet.GraphicCells”  like the below code example, 
 
 
public MainWindow()
{
  InitializeComponent();
  //For importing charts, 
  this.spreadsheet.AddGraphicChartCellRenderer(new GraphicChartCellRenderer());
} 
 
Is there any way to display charts in the sfspreadsheet? 
 
Please find the below UG links to display charts in SfSpreadsheet/Spreadsheet, 
 
For SfSpreadsheet(WPF), 
 
 
 
For Spreadsheet(WindowsForms) 
 
 
 
If still you have problem in displaying charts, could you please share the excel file? 
 
Regards 
Kanimozhi B 


Loader.
Live Chat Icon For mobile
Up arrow icon