MS图表中的帮助 [英] Help in MS Chart

查看:83
本文介绍了MS图表中的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用MS Chart在我的应用程序中呈现图表.
在我的图表中,我需要几行显示学生数据,该行下面指示失败的学生,另一行指示得分较高等.

这些行将从用户设置的数据库值生成.我需要在不添加新系列的情况下显示它,就好像它已经完成一样,因为它在图例中也可见,而我的图例是通过数据库值自动生成的.

我需要使这些线条看起来像图表网格的一部分,而不是图表数据.

需要帮助,因为我找不到任何解决方案.

Hi,
I am using MS Chart for rendering chart in my application.
In my graph I need few lines to display student data below the line indicates fail students, another line indicating for high scoring etc.

These lines will be generated from database values set by user. I need to show this without adding a new series as if it is done is it is also visible in the Legend and my legend is autogenerating through the database values.

I need this lines to look like a part of chart grid not as a chart data.

Help is needed as I cant find any solution.

推荐答案

也许这会有所帮助吗?!

Perhaps this will help?!

<pre lang="cs">private void LoadCharts(ChartKind chartKind) {
    int[] yval = new int[_stats.Count];
    string[] xval = new string[_stats.Count];
    switch (chartKind) {
        case ChartKind.Count:
            for (int i = 0; i < _stats.Count; i++) {
                yval[i] = int.Parse(_stats[i].Count);
                xval[i] = _stats[i].Name;
            }
            break;
        case ...
    }
    chart.Series["Serie"].Points.DataBindXY(xval, yval);
    chart.Series["Serie"].LegendText = chartKind.ToString();
}






这篇关于MS图表中的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆