100分求救:owc11 x轴的空白如何去掉?

lslywy 2011-07-14 10:55:01


如图,当出现负数的时候,x轴未知出现空白带,将图分为2个区域。 怎么可以将2个区域合起来,这个空白太难看了。至少,能缩小的很窄也行 啊。

部分代码如下:

ChartSpace laySpace = new ChartSpaceClass(); // 创建ChartSpace对象来放置图表
ChChart InsertChart = laySpace.Charts.Add(0); // 在ChartSpace对象中添加图表

InsertChart.Type = ChartChartTypeEnum.chChartTypeLine; // 指定绘制图表的类型:折线图, 类型通过OWC.ChartChartTypeEnum枚举值得到
InsertChart.HasLegend = true; // 图表不需要图例标注、不需要标题
InsertChart.HasTitle = false;
InsertChart.Axes[0].HasTitle = true;
InsertChart.Axes[0].Title.Caption = "日期";
InsertChart.Axes[1].HasTitle = true;
InsertChart.Axes[1].Scaling.SplitMaximum=0;
InsertChart.Axes[1].Title.Caption = "涨跌 %";
InsertChart.SeriesCollection.Add(0); // 添加一个series系列
InsertChart.SeriesCollection[0].SetData(ChartDimensionsEnum.chDimSeriesNames, +(int)ChartSpecialDataSourcesEnum.chDataLiteral, strSeriesName); // 给定分类
InsertChart.SeriesCollection[0].SetData(ChartDimensionsEnum.chDimCategories, +(int)ChartSpecialDataSourcesEnum.chDataLiteral, strXdata); // 给定值
InsertChart.SeriesCollection[0].SetData(ChartDimensionsEnum.chDimValues,+(int)ChartSpecialDataSourcesEnum.chDataLiteral, strYdata);

string strAbsolutePath = (Server.MapPath(".")) + "\\ShowData.gif";
laySpace.ExportPicture(strAbsolutePath, "GIF", 870, 450);
string strRelativePath = "./ShowData.gif"; // 创建GIF文件的相对路径.
Panel1.BackImageUrl = strRelativePath.ToString();
...全文
175 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
lslywy 2011-07-16
  • 打赏
  • 举报
回复
周末了,有达人不?
lslywy 2011-07-15
  • 打赏
  • 举报
回复
总不会没人用owc 做过折线图吧?帮帮忙啊!

110,537

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧