Hi,
I am using Aspose.Cells to draw Excel line charts. Basically I want to draw a chart for several data series in both value axis. However, the second axis cannot be shown correctly. If I open the generated chart in Excel 2003, it does not show the second axis. If I open the chart in Excel 2007, the second axis shows, but in a completely wrong position (next to the first value axis).
Is it a bug in Aspose.Cells?
My code snippet looks like this:
// init some data
...
Chart _chart = workbook.Worksheets[0].Charts[0];
// some settings
_chart.NSeries[0].Line.Style = LineType.Solid;
_chart.NSeries[0].Line.Weight = WeightType.MediumLine;
_chart.NSeries[0].MarkerStyle = ChartMarkerType.None;
_chart.NSeries[0].Name = "Line 1- very very long";
_chart.NSeries[0].PlotOnSecondAxis = true;
_chart.NSeries[1].Line.Color = Color.Green;
_chart.NSeries[1].Name = "Line 2- even longggggggggggggger";
_chart.NSeries[2].Line.Color = Color.Red;
_chart.NSeries[2].PlotOnSecondAxis = true;
_chart.NSeries[2].Name = "Line 3- also very very long";
Axis axis2 = _chart.SecondValueAxis;
axis2.IsVisible = true;
axis2.TickLabels.NumberFormat = "0";
axis2.TickLabels.Font.Size = 15;
axis2.Title.Text = "Test";
// save chart
_chart.Calculate();
workbook.Save(fullPath, FileFormatType.Default);
Many thanks for any help!