We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Highlighting a point in a ChartType.Line not working


I use Aspose to create an excel workbook that has 2 sheets. I am drawing the graph on one sheet using the data in the other sheet. I need to plot ONLY 2 points based on the data of the other sheet. I do not want any other points to be displayed hence i used ChartType.Line.

I have attached the excel file i am using and the code i use, I also tried to pass in the row numbers and compare it with the Nseries point location. Still nogo

int chartIndex = wb.Worksheets[CHART_SHEET_TITLE].Charts.Add(ChartType.Line, 6, 1, 42, 8);

Chart chart = wb.Worksheets[CHART_SHEET_TITLE].Charts[chartIndex];

chart.NSeries.Add("Graph Data!B6:B208", true);

chart.NSeries.CategoryData = "Graph Data!A6:A208";

int ROWNUMBER = 180; // Corrosponding value on the Graph Data sheet is 10/16/2010 val = $88,667.25

int ROWNUMBER 1 = 206; // Corrosponding value on the Graph Data sheet is 11/11/2010 val = $69,942,255

for (int j = 0; j < chart.NSeries[i].Points.Count; j++)


if (j == (ROWNUMBER) || j == (ROWNUMBER1))


chart.NSeries[i].Points[j].MarkerSize = 5;

chart.NSeries[i].Points[j].MarkerBackgroundColor = Color.Blue;

chart.NSeries[i].Points[j].MarkerForegroundColor = Color.Blue;

chart.NSeries[i].Points[j].MarkerStyle = ChartMarkerType.Square;

numberOfPointsMarked = numberOfPointsMarked + 1;



Any reply is deeply appreciated.


We are looking into this issue. Aspose.Cells works in the same way as MS Excel do. Please provide us any example of such a chart in MS Excel. Please send us the MS Excel file that contains the chart. We will look into it soon.