public void createReportChart(string fileName, string path)
        {
            ChartProperties chart=new ChartProperties();
            chart.Series = new List<ChartSerieProperties>();
            chart.XAxisType = XAxisTypeEnum.datetime;
            try {
                foreach (CustomReportDataString tag in SelectedTags) {
                    if (tag.MinData) {
                        chart.Series.Add(getItemChartProperties(tag,"min"," (Мин)"));
                    }
                    if (tag.MaxData) {
                        chart.Series.Add(getItemChartProperties(tag, "max", " (Макс)"));
                    }
                    if (tag.AvgData) {
                        chart.Series.Add(getItemChartProperties(tag, "avg", " (Средн)"));
                    }
                }
                chart.Axes = new List<ChartAxisProperties>();

                ChartAxisProperties ax=new ChartAxisProperties();
                ax.Auto = true;
                ax.Index = 0;
                chart.Axes.Add(ax);

                ax=new ChartAxisProperties();
                ax.Auto = true;
                ax.Index = 1;
                chart.Axes.Add(ax);

                chart.toXML(path + fileName);
            } catch (Exception e) {
                Logger.error(String.Format("createReportChart {0}:\n {1}", e.Message, e.StackTrace));
            }
        }
Exemple #2
0
 public static void createNullXML(string fileName)
 {
     ChartProperties prop=new ChartProperties();
     prop.Series = new List<ChartSerieProperties>();
     prop.Series.Add(new ChartSerieProperties());
     prop.toXML(fileName);
 }