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

Does a chart have to be linked to a range?

I am writing a RenderingExtension and the Microsoft...ReportRendering.Chart object contains the data points to be plotted on the chart.

When I look at the Chart api in 6.302.1.8 it looks like the only data source option for a chart is a range.

Is there a way to set the data to plot on the chart instead of using a range.

Thanks,
Kelley


3 Replies

GM Geetha M Syncfusion Team November 14, 2008 07:13 AM UTC

Hi Kelley,

Thank you for your interest in Syncfusion products.

Without using Range object, you can add points to chart series. The following code snippet illustrates this:

IChartShape chart = sheet.Charts.Add();
IChartSerie serie = chart.Series.Add();
serie.EnteredDirectlyValues = new object[] { 17, 36, 72, 25, 62 };

Please refer to the sample demonstrating the same in the below link:
http://websamples.syncfusion.com/samples/XlsIO.Windows/F77716/main.htm

Regards,
Geetha



AD Administrator Syncfusion Team November 14, 2008 01:59 PM UTC

Does it matter what type of chart that it is?

I have added a chart to a sheet
I have added a serie to a chart
I have set the values directly against the serie
My chart does NOT have any data.

I even used the values from your sample and still the chart has no values.

I am using Syncfusion 6.302.1.8


>Hi Kelley,

Thank you for your interest in Syncfusion products.

Without using Range object, you can add points to chart series. The following code snippet illustrates this:

IChartShape chart = sheet.Charts.Add();
IChartSerie serie = chart.Series.Add();
serie.EnteredDirectlyValues = new object[] { 17, 36, 72, 25, 62 };

Please refer to the sample demonstrating the same in the below link:
http://websamples.syncfusion.com/samples/XlsIO.Windows/F77716/main.htm

Regards,
Geetha





GM Geetha M Syncfusion Team November 17, 2008 04:17 AM UTC

Hi Kelley,

Thank you for the update.

Could you please let me know the following?

1. The chart type you are using. This is because almost all charts need at least one series and few others may need more than one.
2. Even if you have not mentioned the chart type, by default, XlsIO will draw column chart. Are you able to achieve this?
3. Is the sample provided in my previous update working for you? Could you please reproduce the problem in it and send back to me?

I tried running the sample with chart type mentioned and it worked fine for me in Essential XlsIO version 6.3.1.8.

Regards,
Geetha


Loader.
Live Chat Icon For mobile
Up arrow icon