首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >你能用winnovative excel图表添加一个次要的y轴吗?

你能用winnovative excel图表添加一个次要的y轴吗?
EN

Stack Overflow用户
提问于 2014-09-10 05:29:13
回答 1查看 295关注 0票数 0

我有一些从我的web代码导出的图表。我正在使用Winnovative来创建excel输出。有没有办法创建第二个y轴,我找不到任何允许我这样做的类。这是我在C#中创建图表的代码,我需要它有两个y轴:

代码语言:javascript
复制
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 (%)");

任何帮助都将不胜感激。我在谷歌和这个网站上搜索了几个小时,没有找到任何解决方案。曲线图显示正确,我就是得不到第二个轴。

谢谢

EN

回答 1

Stack Overflow用户

发布于 2014-09-13 17:11:05

不可能必须有第二个y轴。可以设置的轴有类别(X)、值(Y)和深度(系列)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25753836

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档