public PlotCollectionSet BuildGraph(ConfigurationFrame config, List <ConfigurationPlot> plots, PlotCollectionSet data, bool bAddToParams = false, GETDATAORDER order = GETDATAORDER.PRE) { PlotCollectionSet data1 = new PlotCollectionSet(); if (order == GETDATAORDER.PRE) { if (!config.UseExistingDataMinMax) { data.SetMinMax(); } data.GetAbsMinMax(0, 0, out m_dfAbsMinY, out m_dfAbsMaxY); setMinMaxLines(config); m_rgPlots = new SimpleGraphing.GraphPlotCollection(); m_rgData = new PlotCollectionSet(); m_rgData.Add(data); } for (int i = 0; i < plots.Count; i++) { if ((plots[i].HasCustomBuild || plots[i].Visible) && plots[i].BuildOrder == order) { GraphPlot graphPlot = new SimpleGraphing.GraphPlot(m_cache, m_gx, m_gy); int nLookahead = Math.Max(config.PlotArea.Lookahead, config.PlotArea.CalculationLookahead); PlotCollectionSet set = graphPlot.BuildGraph(plots[i], m_rgData, plots[i].DataIndex, nLookahead, m_rgPlots, bAddToParams); if (set != null) { data1.Add(set, true); } if (graphPlot.Plots != null) { m_rgPlots.Add(graphPlot); m_rgData.Add(graphPlot.Plots, true); } } } if (order == GETDATAORDER.PRE) { m_style = createStyle(config); } return(data1); }
public void Dispose() { if (m_fontNote != null) { m_fontNote.Dispose(); m_fontNote = null; } if (m_rgPlots != null) { m_rgPlots.Dispose(); m_rgPlots = null; } if (m_style != null) { m_style.Dispose(); m_style = null; } if (m_colLabelBrushes != null) { m_colLabelBrushes.Dispose(); m_colLabelBrushes = null; } if (m_colLineBrushes != null) { m_colLineBrushes.Dispose(); m_colLineBrushes = null; } if (m_colLinePens != null) { m_colLinePens.Dispose(); m_colLinePens = null; } if (m_colGridBrushes != null) { m_colGridBrushes.Dispose(); m_colGridBrushes = null; } }
public void SetGraphPlots(GraphPlotCollection plots) { m_plots = plots; }
public PlotCollectionSet BuildGraph(ConfigurationPlot config, PlotCollectionSet data, int nDataIdx, int nLookahead, GraphPlotCollection plots, bool bAddToParams = false) { m_config = config; m_style = createStyle(m_config); PlotCollectionSet dataOut = data; if (!config.TryCustomBuild(data)) { if (m_idata != null) { string strRequiredDataName = m_idata.RequiredDataName; if (strRequiredDataName != null) { foreach (GraphPlot plot in plots) { if (plot.DataName == strRequiredDataName || (plot.DataName == null && plot.ToString() == strRequiredDataName)) { PlotCollectionSet data1 = new PlotCollectionSet(); if (data.Count > 1 || plot.Plots[0] != data[0]) { data1.Add(data); } data1.Add(plot.Plots, true); dataOut = data1; break; } } } dataOut = m_idata.GetData(data, nDataIdx, nLookahead, config.ID, bAddToParams); if (dataOut != null) { dataOut.ExcludeFromMinMax(config.ExcludeFromMinMax); dataOut.SetMarginPercent(config.MarginPercent); } } } m_rgPlots = dataOut; return(dataOut); }