public void MakeGraphics() { ChartAreas.Clear(); Series.Clear(); Legends.Clear(); MakeChart(); Refresh(); }
/// <summary> /// Clear chart and add data from PXModel instance. /// </summary> /// <param name="px">PXModel to add to chart.</param> /// <param name="settings">Settings as PxChartSettings. Eg. as a Lambda expression.</param> public virtual void AddPxData(PXModel px, PxChartSettings settings) { Titles.Clear(); Series.Clear(); Legends.Clear(); ChartAreas.Clear(); initialize(px, settings); }
public void LoadDataFile(String filename) { try { Legends.Clear(); Columns.Clear(); mColours.Clear(); using (XmlTextReader reader = new XmlTextReader(filename)) { while (reader.Read()) { switch (reader.NodeType) { case XmlNodeType.Element: if (reader.Name == "column") { ReadColumn(reader); } else if (reader.Name == "legend") { ReadLegend(reader); } else if (reader.Name == "graph") { mFormatPercent = Convert.ToBoolean(reader.GetAttribute("format_percent")); ValueLabel = reader.GetAttribute("y_label"); } else { MessageBox.Show("Wrong Graph Type", "Cannot Open", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } break; } } } } catch { MessageBox.Show("Invalid Graph File", "Cannot Open", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void SetSource(IEnumerable <LegendAdornmentLayer> legendLayers) => Legends.Clear();