public EasyChartXPlotAreaCollection(EasyChartX baseEasyChart, ChartAreaCollection chartAreas) { this._baseEasyChart = baseEasyChart; this._chartAreas = chartAreas; }
public Chart () { BackColor = Color.White; ChartAreas = new ChartAreaCollection (); Series = new SeriesCollection (); }
public EasyChartXPlotAreaCollection(EasyChartX parentChart, ChartAreaCollection chartAreas) { this._parentChart = parentChart; this._chartAreas = chartAreas; }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { ArrayList arrayList = new ArrayList(); arrayList.Add("NotSet"); ChartAreaCollection chartAreaCollection = null; string b = ""; if (context != null && context.Instance != null) { if (context.Instance is Legend) { Legend legend = (Legend)context.Instance; if (legend.Common != null && legend.Common.ChartPicture != null) { chartAreaCollection = legend.Common.ChartPicture.ChartAreas; } } else if (context.Instance is ChartArea) { ChartArea chartArea = (ChartArea)context.Instance; if (chartArea.Common != null && chartArea.Common.ChartPicture != null) { chartAreaCollection = chartArea.Common.ChartPicture.ChartAreas; b = chartArea.Name; } } else if (context.Instance is Title) { Title title = (Title)context.Instance; if (title.Chart != null && title.Chart.chartPicture != null) { chartAreaCollection = title.Chart.chartPicture.ChartAreas; } } else if (context.Instance is Annotation) { Annotation annotation = (Annotation)context.Instance; if (annotation.Chart != null && annotation.Chart.chartPicture != null) { chartAreaCollection = annotation.Chart.chartPicture.ChartAreas; } } else if (context.Instance is Array) { if (((Array)context.Instance).Length > 0 && ((Array)context.Instance).GetValue(0) is Legend) { Legend legend2 = (Legend)((Array)context.Instance).GetValue(0); if (legend2.Common != null && legend2.Common.ChartPicture != null) { chartAreaCollection = legend2.Common.ChartPicture.ChartAreas; } } else if (((Array)context.Instance).Length > 0 && ((Array)context.Instance).GetValue(0) is ChartArea) { ChartArea chartArea2 = (ChartArea)((Array)context.Instance).GetValue(0); if (chartArea2.Common != null && chartArea2.Common.ChartPicture != null) { chartAreaCollection = chartArea2.Common.ChartPicture.ChartAreas; } } else if (((Array)context.Instance).Length > 0 && ((Array)context.Instance).GetValue(0) is Title) { Title title2 = (Title)((Array)context.Instance).GetValue(0); if (title2.Chart != null && title2.Chart.chartPicture != null) { chartAreaCollection = title2.Chart.chartPicture.ChartAreas; } } else if (((Array)context.Instance).Length > 0 && ((Array)context.Instance).GetValue(0) is Annotation) { Annotation annotation2 = (Annotation)((Array)context.Instance).GetValue(0); if (annotation2.Chart != null && annotation2.Chart.chartPicture != null) { chartAreaCollection = annotation2.Chart.chartPicture.ChartAreas; } } } } if (chartAreaCollection != null) { foreach (ChartArea item in chartAreaCollection) { if (item.Name != b) { arrayList.Add(item.Name); } } } return(new StandardValuesCollection(arrayList)); }
public StripChartXPlotAreaCollection(StripChartX parentChart, ChartAreaCollection chartAreas) { this._parentChart = parentChart; this._chartAreas = chartAreas; }
/// <summary> /// Fill in the list of data series names. /// </summary> /// <param name="context">Descriptor context.</param> /// <returns>Standart values collection.</returns> public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { ArrayList values = new ArrayList(); values.Add(Constants.NotSetValue); ChartAreaCollection areaCollection = null; string areaName = ""; if (context != null && context.Instance != null) { if (context.Instance is Legend) { Legend legend = (Legend)context.Instance; if (legend.Common != null && legend.Common.ChartPicture != null) { areaCollection = legend.Common.ChartPicture.ChartAreas; } } else if (context.Instance is ChartArea) { ChartArea area = (ChartArea)context.Instance; if (area.Common != null && area.Common.ChartPicture != null) { areaCollection = area.Common.ChartPicture.ChartAreas; areaName = area.Name; } } else if (context.Instance is Title) { Title title = (Title)context.Instance; if (title.Chart != null && title.Chart.chartPicture != null) { areaCollection = title.Chart.chartPicture.ChartAreas; } } else if (context.Instance is Annotation) { Annotation annotation = (Annotation)context.Instance; if (annotation.Chart != null && annotation.Chart.chartPicture != null) { areaCollection = annotation.Chart.chartPicture.ChartAreas; } } else if (context.Instance is IServiceProvider) { IServiceProvider provider = context.Instance as IServiceProvider; Chart chart = provider.GetService(typeof(Chart)) as Chart; if (chart != null) { areaCollection = chart.ChartAreas; } } else if (context.Instance is Array) { if (((Array)context.Instance).Length > 0 && ((Array)context.Instance).GetValue(0) is Legend) { Legend legend = (Legend)((Array)context.Instance).GetValue(0); if (legend.Common != null && legend.Common.ChartPicture != null) { areaCollection = legend.Common.ChartPicture.ChartAreas; } } else if (((Array)context.Instance).Length > 0 && ((Array)context.Instance).GetValue(0) is ChartArea) { ChartArea area = (ChartArea)((Array)context.Instance).GetValue(0); if (area.Common != null && area.Common.ChartPicture != null) { areaCollection = area.Common.ChartPicture.ChartAreas; } } else if (((Array)context.Instance).Length > 0 && ((Array)context.Instance).GetValue(0) is Title) { Title title = (Title)((Array)context.Instance).GetValue(0); if (title.Chart != null && title.Chart.chartPicture != null) { areaCollection = title.Chart.chartPicture.ChartAreas; } } else if (((Array)context.Instance).Length > 0 && ((Array)context.Instance).GetValue(0) is Annotation) { Annotation annotation = (Annotation)((Array)context.Instance).GetValue(0); if (annotation.Chart != null && annotation.Chart.chartPicture != null) { areaCollection = annotation.Chart.chartPicture.ChartAreas; } } } } if (areaCollection != null) { foreach (ChartArea area in areaCollection) { if (area.Name != areaName) { values.Add(area.Name); } } } return(new StandardValuesCollection(values)); }