当前位置: 首页>>代码示例>>C#>>正文


C# Chart.GetAllLabels方法代码示例

本文整理汇总了C#中Chart.GetAllLabels方法的典型用法代码示例。如果您正苦于以下问题:C# Chart.GetAllLabels方法的具体用法?C# Chart.GetAllLabels怎么用?C# Chart.GetAllLabels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Chart的用法示例。


在下文中一共展示了Chart.GetAllLabels方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: populateChart

    private void populateChart()
    {
        Chart chrt = new Chart();
        chrt = chrt.GetAllLabels();
        if (chrt!=null)
        {
        Chart1.Series["HPrealgebra"].Label = chrt .Label1;
        Chart1.Series["LPrealgebra"].Label = chrt.Label2;
        string strPre = "0";
        if (chrt.Label3 != "" && chrt.Label3 != null)
        {
            strPre = chrt.Label3.Substring(0, 5);
        }
        Chart1.Series["APrealgebra"].Label = strPre;

        Chart1.Series["HAlgebra"].Label = chrt.Label4;
        Chart1.Series["LAlgebra"].Label = chrt.Label5;
           // string strPre1 = chrt.Label6.Substring(0, 5);
        string strPre1 = "0";
        if (chrt.Label6 != "" && chrt.Label6 != null)
        {
            strPre1 = chrt.Label6.Substring(0, 5);
        }
        Chart1.Series["AAlgebra"].Label = strPre1;

        Chart1.Series["HWritting"].Label = chrt.Label7;
        Chart1.Series["LWritting"].Label = chrt.Label8;
        //string strPre2 = chrt.Label9.Substring(0, 5);
        string strPre2 = "0";
        if (chrt.Label9 != "" && chrt.Label9 != null)
        {
            strPre2 = chrt.Label9.Substring(0, 5);
        }
        Chart1.Series["AWritting"].Label = strPre2;

        Chart1.Series["HReading"].Label = chrt.Label10;
        Chart1.Series["LReading"].Label = chrt.Label11;
        //string strPre3 = chrt.Label12.Substring(0, 5);
        string strPre3 = "0";
        if (chrt.Label12 != "" && chrt.Label12 != null)
        {
            strPre3 = chrt.Label12.Substring(0, 5);
        }
        Chart1.Series["AReading"].Label = strPre3;

        Chart1.Series["HEnglish"].Label = chrt.Label13;
        Chart1.Series["LEnglish"].Label = chrt.Label14;
        //string strPre4 = chrt.Label15.Substring(0, 5);
        string strPre4 = "0";
        if (chrt.Label15 != "" && chrt.Label15 != null)
        {
            strPre4 = chrt.Label15.Substring(0, 5);
        }
        Chart1.Series["AEnglish"].Label = strPre4;

        Chart1.Series["HMath"].Label = chrt.Label16;
        Chart1.Series["LMath"].Label = chrt.Label17;
        //string strPre5 = chrt.Label18.Substring(0, 5);
        string strPre5 = "0";
        if (chrt.Label18 != "" && chrt.Label18 != null)
        {
            strPre5 = chrt.Label18.Substring(0, 5);
        }
        Chart1.Series["AMath"].Label = strPre5;

        Chart1.Series["HReadingAssessment"].Label = chrt.Label19;
        Chart1.Series["LReadingAssessment"].Label = chrt.Label20;
        //string strPre6 = chrt.Label21.Substring(0, 5);
        string strPre6 = "0";
        if (chrt.Label21 != "" && chrt.Label21 != null)
        {
            strPre6 = chrt.Label21.Substring(0, 5);
        }
        Chart1.Series["AReadingAssessment"].Label = strPre6;

        Chart1.Series["HScienceAssessment"].Label = chrt.Label22;
        Chart1.Series["LScienceAssessment"].Label = chrt.Label23;
        //string strPre7 = chrt.Label24.Substring(0, 5);
        string strPre7 = "0";
        if (chrt.Label24 != "" && chrt.Label24 != null)
        {
            strPre7 = chrt.Label24.Substring(0, 5);
        }
        Chart1.Series["AScienceAssessment"].Label = strPre7;
        }
    }
开发者ID:mominbd,项目名称:testing,代码行数:86,代码来源:home.aspx.cs


注:本文中的Chart.GetAllLabels方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。