Connect data point with line

Hi,

I am looking for the equivalent function in Aspose Cells.

In Excel I do this by right-clickung on the chart, Select data. Bottom right of that dialog is a button: "Hidden and empty cells". Here there is an option "Connect data point with line". Which property in Aspose.Cells is equivalent to this?

Hi,


Please try the following line of code for your requirements:
e.g
Sample code:

chart.PlotEmptyCellsType = PlotEmptyCellsType.Interpolated;

Thank you.


Hi,


I have used your provided code. It’s working when I export a single worksheet.
When I merge multiple worksheets into a single excel file then it’s not connecting data points with line.

Note: Each worksheet contains different type of charts(ColumnStacked, Column, line, bar)

Hi,


Could you create a sample console application (runnable), zip it and post us here to reproduce the issue on our end, we will check it soon. Also provide your template files if you have any. This will help us really to evaluate your issue properly to consequently figure the issue (if found) out soon. Moreover, we recommend you to kindly try our latest version/fix: Aspose.Cells for .NET v8.2.2.1

Thank you.

Hi,

I have attached a console application. I have also selected the option “Connect data point with line” in excel template file.

But data point data point is not connecting with line when I have marge multiple workbook. Please have a look

Hi,

Thanks for your sample application and using Aspose.Cells.

We were able to observe this issue after executing your provided sample code using the latest version: Aspose.Cells
for .NET v8.3.0.4
. Connect data points with line does not work when workbooks are combined.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-43228 - Connect data points with line does not work when workbooks are combined.

C#

string path = @“F:\Shak-Data-RW\Downloads\SampleApplication\SampleApplication\bin\Debug”;

string filePath = Path.Combine(path, “Template1.xlsx”);

//First workbook

var firstWorkbook = new Workbook(filePath);

firstWorkbook.Worksheets[“Sheet1”].Cells[32, 1].Value = “Column 1”;

firstWorkbook.Worksheets[“Sheet1”].Cells[33, 0].Value = “Sample 1”;

firstWorkbook.Worksheets[“Sheet1”].Cells[33, 1].Value = 81.00;

firstWorkbook.Worksheets[“Sheet1”].Cells[34, 0].Value = “Sample 2”;

firstWorkbook.Worksheets[“Sheet1”].Cells[34, 1].Value = 84.00;

firstWorkbook.Worksheets[“Sheet1”].Cells[35, 0].Value = “Sample 3”;

firstWorkbook.Worksheets[“Sheet1”].Cells[35, 1].Value = 85.00;


filePath = Path.Combine(path, “Template2.xlsx”);

//Second workbook

var secondWorkbook = new Workbook(filePath);

secondWorkbook.Worksheets[“Sheet1”].Cells[32, 1].Value = “Column 1”;

secondWorkbook.Worksheets[“Sheet1”].Cells[32, 2].Value = “Column 2”;

secondWorkbook.Worksheets[“Sheet1”].Cells[32, 3].Value = “Column 3”;

secondWorkbook.Worksheets[“Sheet1”].Cells[32, 4].Value = “Column 4”;

secondWorkbook.Worksheets[“Sheet1”].Cells[33, 0].Value = “Sample 1”;

secondWorkbook.Worksheets[“Sheet1”].Cells[33, 1].Value = 30.00;

secondWorkbook.Worksheets[“Sheet1”].Cells[33, 2].Value = null;

secondWorkbook.Worksheets[“Sheet1”].Cells[33, 3].Value = 40.00;

secondWorkbook.Worksheets[“Sheet1”].Cells[33, 4].Value = 60.00;

secondWorkbook.Worksheets[“Sheet1”].Cells[34, 0].Value = “Sample 2”;

secondWorkbook.Worksheets[“Sheet1”].Cells[34, 1].Value = 84.00;

secondWorkbook.Worksheets[“Sheet1”].Cells[34, 2].Value = 70.00;

secondWorkbook.Worksheets[“Sheet1”].Cells[34, 3].Value = null;

secondWorkbook.Worksheets[“Sheet1”].Cells[34, 4].Value = 50.00;

secondWorkbook.Worksheets[“Sheet1”].Charts[“Chart 1”].PlotEmptyCellsType = PlotEmptyCellsType.Interpolated;


//Marge first and second workbook

firstWorkbook.Combine(secondWorkbook);


//Save the excel file

firstWorkbook.Save(@“MyFile.xls”);

Hi,


Thanks for the sample project and template files.

I have evaluated your scenario/ case a bit. As a workaround, please move the lines of code (see the lines in bold) to a place after you call the merge operation and before saving the final workbook, it would work fine. Please see the updated/modified part of your code segment for your reference:
e.g
Sample code:

secondWorkbook.Worksheets[“Sheet1”].Cells[34, 1].Value = 84.00;
secondWorkbook.Worksheets[“Sheet1”].Cells[34, 2].Value = 70.00;
secondWorkbook.Worksheets[“Sheet1”].Cells[34, 3].Value = null;
secondWorkbook.Worksheets[“Sheet1”].Cells[34, 4].Value = 50.00;
//Marge first and second workbook
firstWorkbook.Combine(secondWorkbook);

firstWorkbook.Worksheets[1].Charts[“Chart 1”].PlotEmptyCellsType = PlotEmptyCellsType.Interpolated;
firstWorkbook.Worksheets[1].Charts[“Chart 1”].PlotVisibleCells = true;


//Save the excel file
firstWorkbook.Save(@“d:\MyFile.xls”);


And, we will figure out the issue soon.

Thank you.

Hi,

Thanks for using Aspose.Cells.

We have fixed this issue.

  • CELLSNET-43228 - Connect data points with line does not work when workbooks are combined

Please download and try this fix: Aspose.Cells
for .NET v8.3.1.1
and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-43228) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.