예제 #1
0
        private void DefaultData()
        {
            XLabels = new List <string> {
                "2011", "2012", "2013", "2014", "2015"
            };

            var data1 = new Dictionary <string, double> {
                { "2011", 135 }, { "2012", 143 }, { "2013", 196 }, { "2014", 203 }, { "2015", 210 }
            };
            var data2 = new Dictionary <string, double> {
                { "2011", 96 }, { "2012", 101 }, { "2013", 133 }, { "2014", 150 }, { "2015", 180 }
            };
            var data3 = new Dictionary <string, double> {
                { "2011", 221 }, { "2012", 256 }, { "2013", 334 }, { "2014", 409 }, { "2015", 523 }
            };

            ColumnDataSeries series1 = new ColumnDataSeries {
                Data = data1, Title = "DATA1", Background = BuildGradient(Colors.YellowGreen)
            };
            ColumnDataSeries series2 = new ColumnDataSeries {
                Data = data2, Title = "DATA2", Background = BuildGradient(Colors.Yellow)
            };
            LineDataSeries series3 = new LineDataSeries {
                Data = data3, Title = "DATA3", Background = Brushes.Red
            };
            StackedDataSeries series12 = new StackedDataSeries {
                Parts = new List <ColumnDataSeries> {
                    series1, series2
                }
            };

            YValues = new List <DataSeries> {
                series12, series3
            };
        }
예제 #2
0
        public static ISeriesTag CreateSeries(int seriesStyle)
        {
            ISeriesTag series = null;

            switch (seriesStyle)
            {
            case 1: series = new Model.DataSeries.PointLineSeries(); break;

            case 2: series = new ColumnDataSeries(); break;

            case 3: break;
            }

            return(series);
        }