protected override void InitializeControls()
        {
            flexChart1 = new FlexChart();
            this.Chart = flexChart1;

            _cbChartType = ChartControlFactory.BasicChartTypesCombo();
            _cbChartType.SelectedIndexChanged += (s, e) =>
            {
                flexChart1.ChartType = (ChartType)Enum.Parse(typeof(ChartType), _cbChartType.SelectedItem.ToString());
                if (flexChart1.ChartType == ChartType.Bar)
                {
                    flexChart1.AxisX.Format = "p0";
                    flexChart1.AxisY.Format = "0";
                }
                else
                {
                    flexChart1.AxisY.Format = "p0";
                    flexChart1.AxisX.Format = "0";
                }
            };

            _cbPalletes = ControlFactory.EnumBasedCombo(typeof(Palette), "Palette");
            _cbPalletes.SelectedIndexChanged += (s, e) => { flexChart1.Palette = (Palette)Enum.Parse(typeof(Palette), _cbPalletes.SelectedItem.ToString()); };

            this.pnlControls.Controls.Add(_cbPalletes);
            this.pnlControls.Controls.Add(_cbChartType);
        }
        protected override void InitializeControls()
        {
            flexChart1 = new FlexChart();
            this.Chart = flexChart1;

            _cbChartType = ChartControlFactory.BasicChartTypesCombo();
            _cbChartType.SelectedIndexChanged += (s, e) => { flexChart1.ChartType = (ChartType)Enum.Parse(typeof(ChartType), _cbChartType.SelectedValue.ToString()); };

            _cbLabelPosition = ControlFactory.EnumBasedCombo(typeof(LabelPosition), "Label Position");
            _cbLabelPosition.SelectedIndexChanged += (s, e) => { flexChart1.DataLabel.Position = (LabelPosition)Enum.Parse(typeof(LabelPosition), _cbLabelPosition.SelectedValue.ToString()); };

            _chbLabelBorder = new CheckBoxEx("Label Border");
            _chbLabelBorder.CheckedChanged += (s, e) => { flexChart1.DataLabel.Border = _chbLabelBorder.Checked; };

            _chbConnectingLine = new CheckBoxEx("Connecting Line");
            _chbConnectingLine.CheckedChanged += (s, e) => { flexChart1.DataLabel.ConnectingLine = _chbConnectingLine.Checked; };

            _lLabelAngle  = new LabelEx("Angle :");
            _udLabelAngle = new NumericUpDownEx {
                Minimum = -90, Maximum = 90, Value = 0, Increment = 30, Width = 40
            };
            _udLabelAngle.ValueChanged += (s, e) => { flexChart1.DataLabel.Angle = (int)_udLabelAngle.Value; };

            this.pnlControls.Controls.Add(_cbChartType);
            this.pnlControls.Controls.Add(_cbLabelPosition);
            this.pnlControls.Controls.Add(_chbLabelBorder);
            this.pnlControls.Controls.Add(_chbConnectingLine);
            this.pnlControls.Controls.Add(_lLabelAngle);
            this.pnlControls.Controls.Add(_udLabelAngle);
        }
        protected override void InitializeControls()
        {
            flexChart1 = new FlexChart();
            this.Chart = flexChart1;

            _cbChartType = ChartControlFactory.BasicChartTypesCombo();
            _cbChartType.SelectedIndexChanged += (s, e) => this.flexChart1.ChartType = (ChartType)Enum.Parse(typeof(ChartType), _cbChartType.SelectedItem.ToString());

            _cbErrorAmount      = ControlFactory.EnumBasedCombo(typeof(ErrorAmount), "Error amount");
            _cbErrorAmount.Size = new Size(180, 21);
            _cbErrorAmount.SelectedIndexChanged += _cbErrorAmount_SelectedIndexChanged;

            _cbDirection = ControlFactory.EnumBasedCombo(typeof(ErrorBarDirection), "Direction");
            _cbDirection.SelectedIndexChanged += (s, e) => _bar.Direction = (ErrorBarDirection)Enum.Parse(typeof(ErrorBarDirection), _cbDirection.SelectedItem.ToString());

            _cbEndStyle = ControlFactory.EnumBasedCombo(typeof(ErrorBarEndStyle), "End style");
            _cbEndStyle.SelectedIndexChanged += (s, e) => _bar.EndStyle = (ErrorBarEndStyle)Enum.Parse(typeof(ErrorBarEndStyle), _cbEndStyle.SelectedItem.ToString());

            _chbRotate = new CheckBoxEx("Rotate");
            _chbRotate.CheckedChanged += (s, e) => this.flexChart1.Rotated = _chbRotate.Checked;

            this.pnlControls.Controls.Add(_cbChartType);
            this.pnlControls.Controls.Add(_cbErrorAmount);
            this.pnlControls.Controls.Add(_cbDirection);
            this.pnlControls.Controls.Add(_cbEndStyle);
            this.pnlControls.Controls.Add(_chbRotate);
        }
        protected override void InitializeControls()
        {
            flexChart1 = new FlexChart();
            this.Chart = flexChart1;

            _cbChartType = ChartControlFactory.BasicChartTypesCombo();
            _cbChartType.SelectedIndexChanged += (s, e) => { flexChart1.ChartType = (ChartType)Enum.Parse(typeof(ChartType), _cbChartType.SelectedItem.ToString()); };

            _cbSelectionMode = ControlFactory.EnumBasedCombo(typeof(ChartSelectionMode), "Selection Mode");
            _cbSelectionMode.SelectedIndexChanged += (s, e) => { flexChart1.SelectionMode = (ChartSelectionMode)Enum.Parse(typeof(ChartSelectionMode), _cbSelectionMode.SelectedItem.ToString()); };

            this.pnlControls.Controls.Add(_cbChartType);
            this.pnlControls.Controls.Add(_cbSelectionMode);
        }
Exemplo n.º 5
0
        protected override void InitializeControls()
        {
            flexChart1 = new FlexChart();
            this.Chart = flexChart1;

            cbChartType = ChartControlFactory.BasicChartTypesCombo();
            cbChartType.SelectedIndexChanged += (s, e) =>
            {
                flexChart1.ChartType = (ChartType)Enum.Parse(typeof(ChartType), cbChartType.SelectedItem.ToString());
                UpdateStackGroupVisibility();
            };

            cbPalette = ControlFactory.EnumBasedCombo(typeof(Palette), "Palette");
            cbPalette.SelectedIndexChanged += (s, e) => flexChart1.Palette = (C1.Chart.Palette)Enum.Parse(typeof(C1.Chart.Palette), cbPalette.SelectedItem.ToString());


            cbStacked = ControlFactory.EnumBasedCombo(typeof(Stacking), "Stacking");
            cbStacked.SelectedIndexChanged += (s, e) =>
            {
                flexChart1.Stacking = (C1.Chart.Stacking)Enum.Parse(typeof(C1.Chart.Stacking), cbStacked.SelectedItem.ToString());
                UpdateStackGroupVisibility();
            };

            chbRotate = new CheckBoxEx("Rotate");
            chbRotate.CheckedChanged += (s, e) => flexChart1.Rotated = chbRotate.Checked;

            chbGroup = new CheckBoxEx("Stacked Group")
            {
                Visible = false
            };
            chbGroup.CheckedChanged += ChbGroup_CheckedChanged;

            pnlControls.Controls.Add(cbChartType);
            pnlControls.Controls.Add(cbPalette);
            pnlControls.Controls.Add(cbStacked);
            pnlControls.Controls.Add(chbRotate);
            pnlControls.Controls.Add(chbGroup);
        }