This project has moved and is read-only. For the latest updates, please go here.

Version 2.9 versus 3.0 Line Chart Formatting

Apr 18, 2012 at 8:54 PM

I had version 2.9 installed and created a line chart with three lines and everything printed correctly.  Then I installed version 3.0 so I could add different markers for each line and the chart changed how it displayed.  One of the lines marked out what was estimated for a project and had numbers in each column.  The second and third lines only had information out to the current values.   Before the upgrade the second and third lines stopped printing at the current values but after the upgrade the the third line dropped to zero.  I know I can fix this by selecting the line and modifying the Hidden and Empty Cell settings but this will not work for my application users.  Is there a way to get this to print correctly in the new version?  I have included both examples of the code.  Any help would be greatly appreciated.

 


Version 2.9

var series1 = wsChart.Series.Add("B29:N29", "B27:N27");
var series2 = wsChart.Series.Add(
    ExcelRange.GetAddress(30, 2, 30, iMonth + 2), ExcelRange.GetAddress(27, 2, 27, iMonth + 2));
var series3 = wsChart.Series.Add(
    ExcelRange.GetAddress(31, 2, 31, iMonth + 2), ExcelRange.GetAddress(27, 2, 27, iMonth + 2));


Version 3.0
var series1 = (wsChart.Series.Add("B29:N29", "B27:N27") as ExcelLineChartSerie);series1.Marker = eMarkerStyle.Diamond;
                                               
var series2 = (wsChart.Series.Add("B30:N30", "B27:N27") as ExcelLineChartSerie);
series2.Marker = eMarkerStyle.Square;

var series3 = (wsChart.Series.Add("B31:N31", "B27:N27") as ExcelLineChartSerie);
series3.Marker = eMarkerStyle.Triangle;
May 2, 2012 at 7:28 PM

Hi,

I made some changes due to differences between Excel 2007 and 2010. I'm not sure if this is an bug after these changes, so could you create an issue with your code and the workbook (you can mail workbook to epplusdocs@gmail.com if you dont want to expose the data). 

Jan