private void ChartConditionalFormatting_Load(object sender, EventArgs e) { rulesManager.Options.AllowedRules = RuleTypes.Gradient; rulesManager.Options.IsFontStyleVisible = false; rulesManager.Options.IsHistogramVisible = false; rulesManager.Options.IsTextAlignVisible = false; rulesManager.Options.IsTextColorVisible = false; var dataSource = DemoDataSource("select top 9 * from Products where UnitsInStock > 0 and UnitsOnOrder > 0 ", true); formattablePieChart.ToolTip.Content = "{name} : {value}"; formattablePieChart.DataSource = dataSource; formattablePieChart.DataSourceChanged(new ListChangedEventArgs(ListChangedType.Reset, 0)); formattableFlexChart.DataSource = dataSource; formattableFlexChart.DataSourceChanged(new ListChangedEventArgs(ListChangedType.Reset, 0)); var horizontalScrollbar = new AxisScrollbar(formattableFlexChart.AxisX); horizontalScrollbar.ScrollButtonsVisible = false; ApplyRules(); // uncomment line below to allow saving of changed rules in xml file and loading of it on startup of application // rulesManager.RulesChanged += RulesManager_RulesChanged; }
private void flexChart1_Rendered(object sender, RenderEventArgs e) { if (axisScrollbar == null) { axisScrollbar = new AxisScrollbar(flexChart1.AxisX); axisScrollbar.ValueChanged += XRangeSelector_ValueChanged; } }
private void SetupAxisScrollbar() { if (_scrollbar != null) { return; } _scrollbar = new AxisScrollbar(flexChart1.AxisX); }
public void SetupRangeSelector() { if (_horizontalAxisScrollbar != null || _verticalAxisScrollbar != null) { return; } // add horizontal AxixScrollbar _horizontalAxisScrollbar = new AxisScrollbar(flexChart1.AxisX); _horizontalAxisScrollbar.Height = 24; // add vartical AxixScrollbar _verticalAxisScrollbar = new AxisScrollbar(flexChart1.AxisY); _verticalAxisScrollbar.ScrollButtonsVisible = false; }
public void SetupRangeSelector() { if (_horizontalAxisScrollbar != null || _verticalAxisScrollbar != null) { return; } // add horizontal AxixScrollbar _horizontalAxisScrollbar = new AxisScrollbar(flexChart1.AxisX); _horizontalAxisScrollbar.Height = 20; // add vertical AxixScrollbar _verticalAxisScrollbar = new AxisScrollbar(flexChart1.AxisY); _verticalAxisScrollbar.Width = 20; }
private void chkScrollbar_CheckedChanged(object sender, EventArgs e) { if (chkScrollbar.Checked) { if (horzBar == null) { horzBar = new AxisScrollbar(flexChart1.AxisX); } horzBar.ScrollButtonsVisible = true; horzBar.BorderStyle = BorderStyle.FixedSingle; horzBar.UpperValue = 5; } else { if (horzBar != null) { horzBar.Remove(); horzBar = null; } } }
private void MainForm_Load(object sender, EventArgs e) { InitThemes(); ribbonComboBoxTheme.SelectedIndex = ribbonComboBoxTheme.Items.IndexOf("Office2016Green"); var dataSource = GetDataSource(); formattablePieChart.ToolTip.Content = "{name} : {value}"; formattablePieChart.DataSource = dataSource; formattablePieChart.DataSourceChanged(new ListChangedEventArgs(ListChangedType.Reset, 0)); formattableFlexChart.DataSource = dataSource; formattableFlexChart.DataSourceChanged(new ListChangedEventArgs(ListChangedType.Reset, 0)); var horizontalScrollbar = new AxisScrollbar(formattableFlexChart.AxisX); horizontalScrollbar.ScrollButtonsVisible = false; ApplyRules(); // uncomment line below to allow saving of changed rules in xml file and loading of it on startup of application // rulesManager.RulesChanged += RulesManager_RulesChanged; }