Exemplo n.º 1
0
 public void Dispose()
 {
     if (m_style != null)
     {
         m_style.Dispose();
         m_style = null;
     }
 }
Exemplo n.º 2
0
        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);
        }