示例#1
0
        public ChartA()
        {
            InitializeComponent();
            List <int> countList = new List <int>();

            countList = TheOrderViewModel.OrderRanges();

            Values = new ChartValues <int> {
                countList[0], countList[1], countList[2], countList[3],
                countList[4]
            };
            Labels      = new[] { "$0 - $10", "$10 - $15", "$15 - $20", "$20 - $25", "$25 - $30", "over $30" };
            Formatter   = value => value.ToString("N");
            DataContext = this;
        }
示例#2
0
        public ChartB()
        {
            InitializeComponent();
            List <int> countList = new List <int>();

            countList = TheOrderViewModel.BasketAverages();

            Values = new ChartValues <double> {
                countList[0], countList[1], countList[2], countList[3],
                countList[4], countList[5]
            };
            Labels    = new[] { "1", "2", "3", "4", "5", "over 5" };
            Formatter = value => value.ToString("N");

            DataContext = this;
        }