读书人

dotnetcharting 的线图怎么让X轴显示自

发布时间: 2012-12-17 09:31:41 作者: rapoo

dotnetcharting 的线图如何让X轴显示自定义数据
case "线图":
{
this.Chart.Title = "统计结果线图"; // Set the title.
this.Chart.Type = ChartType.Scatter; // Set the chart Type
this.Chart.Use3D = false; // Turn 3D off.
this.Chart.DefaultSeries.Type = SeriesType.Line; // Set default series type
this.Chart.DefaultSeries.DefaultElement.Transparency = 20; // Set a default transparency
this.Chart.XAxis.Label.Text = "设备类型"; // Set the x axis label
this.Chart.YAxis.Label.Text = "故障个数"; // Set the y axis label
this.Chart.TempDirectory = "../Source/TempImags"; // Set the directory where the images will be stored.
this.Chart.Width = 600; // Set the chart size.
this.Chart.Height = 350;



SeriesCollection SC = new SeriesCollection();
Series s = new Series();
int j = 1;
for (int i = 0; i < num; i++)
{
Element e = new Element();
e.Name = dt.Rows[i][0].ToString();
e.XValue = j++;
Chart.DefaultElement.ShowValue = true;
e.YValue = Convert.ToDouble(dt.Rows[i][1]);
s.Elements.Add(e);
}
SC.Add(s);
this.Chart.SeriesCollection.Add(SC);
break;
}
目前x轴只能显示数字,请问哪个属性是设置x轴的显示值的?我想显示自己数据库中和y轴值对应的中文数据
[解决办法]
看不懂??
[解决办法]
该回复于2009-08-06 09:11:22被版主删除
[解决办法]
DotNetCharting是要钱的,而且很复杂,没有用过。
一直用Chartlet,简单好用,最主要是免费的。网站上有实例代码下载,设置横坐标显示很方便的。
http://aspspider.ws/Chartlet/Default.aspx
贴两个图先

[解决办法]
mark 也遇到这个问题

读书人网 >.NET

热点推荐