public PieChartValue[] GetPieDataLegendAndTexts() { var list = new List <PieChartValue>(); int legendItemsNum = LegendItems.Length; PieChartValue pieValue = new PieChartValue(); for (int i = 0; i < legendItemsNum; i++) { if (i == 12 || i == 24) { LegendArrows[1].Click(); } pieValue.tagOrCommodity = LegendItems[i].Text; pieValue.valueAndUOM = PieDataLabelTexts[i].Text; list.Add(pieValue); } if (legendItemsNum > 11) { for (int j = 0; j < (int)(legendItemsNum / 12); j++) { LegendArrows[0].Click(); } } return(list.ToArray()); }
private void BindJurisdictionTypesChart(int filterYear) { PieChartValue value; DEWSReference.DeptEstadoDataSoapClient DEWS = new DeptEstadoDataSoapClient(); foreach (DataRow dRow in DEWS.GetCorpJurisdictionsByYear(filterYear).Rows) { value = new PieChartValue(); value.Category = dRow["Jurisdiction"].ToString(); value.Data = Convert.ToDecimal(dRow["CorpTotal"]); pcJurisdictionTypes.PieChartValues.Add(value); } }
private void BindCorporationTypesChart(int filterYear) { PieChartValue value; DEWSReference.DeptEstadoDataSoapClient DEWS = new DeptEstadoDataSoapClient(); foreach (DataRow dRow in DEWS.GetCorpTypesByYear(filterYear).Rows) { value = new PieChartValue(); value.Category = dRow["CorpType"].ToString(); value.Data = Convert.ToDecimal(dRow["CorpTotal"]); value.PieChartValueColor = dRow["CorpType"].ToString() == "For Profit" ? "#D94F4C" : "#518CD7"; pcCorpTypes.PieChartValues.Add(value); } }