Hi,
I want to generate a Chart (Line Chart) using following code :
Aspose.Slides.Charts.IChart chart = s.Shapes.InsertChart(Aspose.Slides.Charts.ChartType.Line, 10, 10, des.SlideSize.Size.Width - 20, des.SlideSize.Size.Height - 10,0);
int defaultWorksheetIndex = 0;
chart.ChartData.Series.Clear();
double[] xarr4 = new double[myElementGraphData.Count];
double[] yarr4 = new double[myElementGraphData.Count];
IChartDataWorkbook fact = chart.ChartData.ChartDataWorkbook;
for (int j = 0; j < myElementGraphData.Count; j++)
{
chart.ChartData.Series.Add(fact.GetCell(defaultWorksheetIndex, j+1, 0, myElementGraphData[j].ColItemId), chart.Type);
}
IChartSeries series = chart.ChartData.Series[0];
for (int j = 0; j < myElementGraphData.Count; j++)
{
xarr4[j] = myElementGraphData[j].ColItemId;
string[] num = myElementGraphData[j].Number.Split(’,’);
yarr4[j] = Convert.ToDouble(num[0]);
series.DataPoints.AddDataPointForLineSeries(fact.GetCell(defaultWorksheetIndex, j + 1, 1, yarr4[j]));
}
problem i am facing here is i am not able to c y axis properly i.e. all the tags are getting overlapped.
Legends are coming wrongly.
Note that : if i create the scattered graph with same data i am able to see output properly and from powerpoint if i change the chart type to line i am able to c correct output.
Thanks and Regards,
Amey