public ValueSelectorControl(ScatterChartConstantLineUserData data) { DataLayoutControl dataLayoutControl = new DataLayoutControl(); BindingSource source = new BindingSource(); ConstantLineModuleData = data ?? new ScatterChartConstantLineUserData(); source.DataSource = ConstantLineModuleData; dataLayoutControl.DataSource = source; dataLayoutControl.RetrieveFields(); dataLayoutControl.Dock = DockStyle.Fill; Controls.Add(dataLayoutControl); Dock = DockStyle.Top; }
void UpdateChart(SeriesCollection series, ScatterChartDashboardItem chartDashboardItem) { ScatterChartConstantLineUserData moduleData = GetDataFromString(chartDashboardItem.CustomProperties.GetValue(PropertyName)); if (moduleData != null && moduleData.Enabled) { BubbleSeriesView seriesView = series.OfType <Series>().Where(s => s.View is BubbleSeriesView).Select(s => s.View as BubbleSeriesView).FirstOrDefault(); if (seriesView != null) { seriesView.AxisX.ConstantLines.Clear(); seriesView.AxisY.ConstantLines.Clear(); SetUpLine(seriesView.AxisX, ColorTranslator.FromHtml("#14abb7"), ColorTranslator.FromHtml("#0e9ca9"), moduleData.VerticalAxisValue); SetUpLine(seriesView.AxisY, ColorTranslator.FromHtml("#14abb7"), ColorTranslator.FromHtml("#0e9ca9"), moduleData.HorizontalAxisValue); } } }