本文整理汇总了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;
}
}