Пример #1
0
        public MainPage()
        {
            InitializeComponent();

            _data = new List <double> {
                80, 100, 90, 80, 70, 95
            };
            _categories = new List <string> {
                "cat 1", "cat 2", "cat 3", "cat 4", "cat 5", "cat 6",
            };
            _sliders = new List <Slider>();

            graph = new Models.Services.PolygonGraph(new Models.Services.PolygonGraphOptions());
            graph.setCategories(_categories).setData(_data);

            for (int index = 0; index < _data.Count(); index++)
            {
                Slider slider = new Slider(0, 100, _data[index]);
                slider.Margin = 0;

                slider.ValueChanged += OnSliderValueChanged;

                _sliders.Add(slider);
                MainLayout.Children.Add(slider);
            }
        }
        public Exemple2()
        {
            InitializeComponent();

            _data = new List <double> {
                80, 100, 90, 80
            };
            _categories = new List <string> {
                "cat 1", "cat 2", "cat 3", "cat 4"
            };
            _sliders = new List <Slider>();

            graph = new Models.Services.PolygonGraph(new Models.Services.PolygonGraphOptions
            {
                AngleStart       = Models.Services.PolygonGraphOptions.ANGLE_DEFAULT,
                CornerRadius     = 4,
                CountGraduations = 4,
                CountVertices    = 4
            });
            graph.setCategories(_categories).setData(_data);


            for (int index = 0; index < _data.Count(); index++)
            {
                Slider slider = new Slider(0, 100, _data[index]);
                slider.Margin = 0;

                slider.ValueChanged += OnSliderValueChanged;

                _sliders.Add(slider);
                MainLayout.Children.Add(slider);
            }
        }