public PieSelectionSample()
        {
            InitializeComponent();
            Title = AppResources.PieSelectionTitle;

            this.lblSelectedOffset.Text = AppResources.SelectedItemOffset;
            this.lblSelectedPos.Text    = AppResources.SelectedItemPosition;
            this.flexPie.ItemsSource    = PieChartSampleFactory.CreateEntiyList();
            this.flexPie.Palette        = Palette.Superhero;
            this.flexPie.ToolTip        = null;

            Device.OnPlatform(Android: () =>
                              this.flexPie.SelectionStyle.StrokeDashArray = new double[] { 15, 5 }
                              );

            Device.OnPlatform(WinPhone: () =>
                              this.flexPie.SelectionStyle.StrokeDashArray = new double[] { 3, 1 }
                              );

            Device.OnPlatform(iOS: () =>
                              this.flexPie.SelectionStyle.StrokeDashArray = new double[] { 7.5, 2.5 }
                              );

            this.pickerPosition.SelectedIndexChanged += pickerPosition_SelectedIndexChanged;
            foreach (var item in Enum.GetNames(typeof(ChartPositionType)))
            {
                this.pickerPosition.Items.Add(item);
            }
            this.pickerPosition.SelectedIndex = 3;

            root.SizeChanged += root_SizeChanged;
        }
Example #2
0
 public PieGettingStartedSample()
 {
     InitializeComponent();
     Title = AppResources.PieGettingStartedTitle;
     this.pieChart.ItemsSource   = PieChartSampleFactory.CreateEntiyList();
     this.donutChart.ItemsSource = PieChartSampleFactory.CreateEntiyList();
     this.root.SizeChanged      += root_SizeChanged;
 }
Example #3
0
        public PieBasicFeaturesSample()
        {
            InitializeComponent();
            Title = AppResources.PieBasicFeaturesTitle;
            this.lblOffset.Text     = AppResources.Offset;
            this.lblReversed.Text   = AppResources.Reversed;
            this.lblStartAngle.Text = AppResources.StartAngle;
            this.lblRadius.Text     = AppResources.InnerRadius;

            this.flexPie.ItemsSource       = PieChartSampleFactory.CreateEntiyList();
            this.flexPie.Palette           = Palette.Midnight;
            this.flexPie.SelectionChanged += FlexPie_SelectionChanged;
        }
        public PieLegendAndTitlesSample()
        {
            InitializeComponent();
            Title = AppResources.PieLegendSampleTitle;
            this.lblHeader.Text = AppResources.Header;
            this.lblFooter.Text = AppResources.Footer;
            this.lblLegend.Text = AppResources.LegendPosition;

            this.flexPie.ItemsSource = PieChartSampleFactory.CreateEntiyList();
            this.pickerLegendPosition.SelectedIndexChanged += pickerPosition_SelectedIndexChanged;

            foreach (var item in Enum.GetNames(typeof(ChartPositionType)))
            {
                this.pickerLegendPosition.Items.Add(item);
            }
            this.pickerLegendPosition.SelectedIndex = 4;
            this.flexPie.LegendPosition             = ChartPositionType.Auto;
            this.flexPie.ToolTip = null;
        }
Example #5
0
        public PieThemingSample()

        {
            InitializeComponent();
            Title = AppResources.PieThemingTitle;
            this.lblTheming.Text     = AppResources.Therming;
            this.listPalettes        = new List <Palette>();
            this.flexPie.ItemsSource = PieChartSampleFactory.CreateEntiyList();

            foreach (var field in typeof(Palette).GetRuntimeFields())
            {
                if (field.FieldType == typeof(Palette))
                {
                    listPalettes.Add((Palette)field.GetValue(null));
                    this.pickerTheming.Items.Add(field.Name);
                }
            }

            this.pickerTheming.SelectedIndex         = 0;
            this.pickerTheming.SelectedIndexChanged += pickerThemeing_SelectedIndexChanged;
        }
Example #6
0
        public PieDataLabel()
        {
            InitializeComponent();
            Title                              = AppResources.PieDataLabelsTitle;
            this.lblPos.Text                   = AppResources.LabelPosition;
            this.flexPie.ItemsSource           = PieChartSampleFactory.CreateEntiyList();
            this.flexPie.Palette               = Palette.Organic;
            this.flexPie.DataLabel.Content     = "{y}";
            this.flexPie.DataLabel.Border      = true;
            this.flexPie.DataLabel.BorderStyle = new ChartStyle {
                Stroke = Color.Red, StrokeThickness = 2
            };
            this.flexPie.DataLabel.Style = new ChartStyle {
                Stroke = Color.Gray, FontSize = 20
            };

            foreach (var item in Enum.GetNames(typeof(PieLabelPosition)))
            {
                this.pickPostion.Items.Add(item);
            }
            this.pickPostion.SelectedIndex = 2;
        }