首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

dotnetcharting X轴间距 设置

2012-09-21 
dotnetcharting X轴间隔 设置dotnetcharting 生成的柱状图后,X轴上的文字和生成的柱子位置无法对齐,不知道

dotnetcharting X轴间隔 设置
dotnetcharting 生成的柱状图后,X轴上的文字和生成的柱子位置无法对齐,

  不知道设置那个属性可以使两者对齐呢

  谢谢各位

  这是柱状图的源码
  // Set the title.
  ChartReport.Title = "委托单类型统计";

  ChartReport.Palette = new Color[] { Color.FromArgb(49, 255, 49), Color.FromArgb(255, 255, 0), Color.FromArgb(255, 99, 49), Color.FromArgb(0, 156, 255) };

  // Change the shading mode
  ChartReport.ShadingEffectMode = ShadingEffectMode.One;

  // Set the x axis label
  //ChartReport.XAxis.Label.Text = "";

  ChartReport.DefaultElement.ShowValue = true;

  // Set the y axis label
  //ChartReport.YAxis.Label.Text = "数量";

  // Set the directory where the images will be stored.
  //Chart.TempDirectory = "temp";


  // Set he chart size.
  ChartReport.Width = 850;
  ChartReport.Height = 450;

  //ChartReport.XAxis.StaticColumnWidth = 140; //每个单元格的宽度
  //ChartReport.XAxis.TimeScaleLabels.RangeIntervals.Add(TimeInterval.Years);

  // Add the random data.
  ChartReport.SeriesCollection.Add(getRandomData());
 

[解决办法]
我也碰到这种情况,至今没有解决。另外,如果Chart的数据不是绑定在一个数据表,而是自己赋值,如:
s.Elements.Add(tempElement)
SC.Add(s)
那么,生成图表的柱子的宽度也无法设置

热点排行