0

I have some charts that are exported from my web code. I am using Winnovative to create the excel output. Is there a way to create a secondary (second) y-axis, I cannot find any class that is allowing me to do this. This is my code in C# that is creating the chart, I need it to have 2 y-axis:

ExcelChart excelChart3 = worksheet.Charts.AddChart((ExcelChartType)39);
    excelChart3.LeftColumnIndex = (1);
    excelChart3.RightColumnIndex = (6);
    excelChart3.TopRowIndex = (25);
    excelChart3.BottomRowIndex = (40);
    excelChart3.SeriesByRows = (true);
    excelChart3.ShowDataTable = (false);
    excelChart3.Title.Text = ("Job Growth/Units Ratio & Rent Growth");
    excelChart3.Title.Font.Size = (10.0);
    excelChart3.Title.Font.Color = (Color.DarkBlue);
    excelChart3.Legend.Interior.FillType = ((ExcelShapeFillType)1);
    excelChart3.Legend.Interior.SolidFillOptions.BackColor = (Color.WhiteSmoke);
    excelChart3.Legend.Font.Size = (7.0);
    excelChart3.Legend.Font.Bold = (true);
    excelChart3.Legend.Position = 0;
    excelChart3.CategoryAxis.CategoryAxisType = ((ExcelChartCategoryAxisType)1);
    excelChart3.CategoryAxis.Font.Size = (8.0);
    excelChart3.CategoryAxis.CategoryLabelsInterval = (3);
    excelChart3.CategoryAxis.ShowMajorGridLines = (false);
    excelChart3.CategoryAxis.CategoryLabelsPosition = ((ExcelChartAxisLabelPosition)1);
    excelChart3.ValueAxis.Font.Size = (8.0);
    excelChart3.ChartArea.Interior.FillType = ((ExcelShapeFillType)1);
    excelChart3.ChartArea.Interior.SolidFillOptions.BackColor = (Color.White);
    excelChart3.PlotArea.Interior.FillType = ((ExcelShapeFillType)1);
    excelChart3.PlotArea.Interior.SolidFillOptions.BackColor = (Color.White);
    ExcelChartSeries excelChartSeries3 = excelChart3.Series.AddSeries("Annual Job      Growth/Units Ratio");
    excelChartSeries3.ChartType = ((ExcelChartType)39);
    excelChartSeries3.CategoryNamesRange = (worksheet["A59:A75"]);
    excelChartSeries3.ValuesRange = (worksheet["D59:D75"]);
    excelChartSeries3.Name = ("Annual Job Growth/Units Ratio");
    ExcelChartSeries excelChartSeries4 = excelChart3.Series.AddSeries("Rental Growth");           
    excelChartSeries4.ChartType = ((ExcelChartType)39);
    excelChartSeries4.CategoryNamesRange = (worksheet["A59:A75"]);
    excelChartSeries4.ValuesRange = (worksheet["E59:E75"]);
    excelChartSeries4.Name = ("Rent Growth (%)");

Any help would be greatly appreciated. I searched google and this site for a few hours and came up with no solutions. The graph shows up correctly, I just cannot get the secondary axis.

Thanks

1 Answers1

0

It is not possible to have to have a secondary y axis. The axes you can set are category (X), value (Y) and depth (series).

Winnovative
  • 118
  • 7