public void SharingSeries() { var aGuy = new CartesianChart(); var bGuy = new CartesianChart(); aGuy.MockIt(new CoreSize(200, 200)); bGuy.MockIt(new CoreSize(200, 200)); var aSeries = new LineSeries(); aGuy.Series.Add(aSeries); aGuy.Update(); Debug.WriteLine(aGuy.Series.Count); bGuy.Series.Add(aSeries); bGuy.Update(); Debug.WriteLine(aGuy.Series.Count); Debug.WriteLine(bGuy.Series.Count); }
private void refreshGoalRecords() { using (var db = new GoalMasterDatabaseContext()) { var resultGoals = db.GoalRecords.Where(x => x.GoalDefinition.ID == FirstGoalDefinition.ID); //db.Users.FirstOrDefault(x => x.ID == User.ID).GoalRecords.Where(x => x.GoalDefinition.ID == FirstGoalDefinition.ID); //if (resultGoals == null) // return; //GoalRecords = new ObservableCollection<GoalRecord>(resultGoals); GoalRecords2 = new SeriesCollection(); if (FirstGoalDefinition == null) { return; } var goalDefinitionUsers = db.GoalDefinitions.FirstOrDefault(x => x.ID == FirstGoalDefinition.ID).Users; Dates = new ObservableCollection <string>(); foreach (var goal in resultGoals) { if (!Dates.Contains(goal.OnlyDate)) { Dates.Add(goal.OnlyDate); } } var orderedList = Dates.OrderBy(x => DateTime.Parse(x)).ToList(); Dates = new ObservableCollection <string>(orderedList); foreach (var user in goalDefinitionUsers) { var lineSerie = new LiveCharts.Wpf.LineSeries(); lineSerie.Title = user.Login; lineSerie.DataLabels = true; var userGoals = db.GoalRecords.Where(x => x.User.ID == user.ID && x.GoalDefinition.ID == FirstGoalDefinition.ID); lineSerie.Values = new ChartValues <ObservablePoint>(); for (int i = 0; i < Dates.Count; i++) { bool isAdded = false; foreach (var goal in userGoals) { if (Dates[i] == goal.OnlyDate) { lineSerie.Values.Add(new ObservablePoint(i, goal.Value)); break; } } } lineSerie.LineSmoothness = 0; GoalRecords2.Add(lineSerie); } } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\MainWindow.xaml" ((LiveChartsWPF.MainWindow)(target)).Closed += new System.EventHandler(this.Window_Closed); #line default #line hidden return; case 2: this.ComboBox1 = ((System.Windows.Controls.ComboBox)(target)); return; case 3: this.BtnConnect = ((System.Windows.Controls.Button)(target)); #line 17 "..\..\MainWindow.xaml" this.BtnConnect.Click += new System.Windows.RoutedEventHandler(this.ConnectClick); #line default #line hidden return; case 4: this.Series = ((LiveCharts.Wpf.LineSeries)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MonthComboBox = ((System.Windows.Controls.ComboBox)(target)); #line 44 "..\..\Statistics.xaml" this.MonthComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.DateSelectionChanged); #line default #line hidden return; case 2: this.YearComboBox = ((System.Windows.Controls.ComboBox)(target)); #line 60 "..\..\Statistics.xaml" this.YearComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.DateSelectionChanged); #line default #line hidden return; case 3: this.Chart1 = ((LiveCharts.Wpf.CartesianChart)(target)); return; case 4: this.Values1 = ((LiveCharts.Wpf.LineSeries)(target)); return; case 5: this.Pie = ((LiveCharts.Wpf.PieChart)(target)); return; case 6: this.Food = ((LiveCharts.Wpf.PieSeries)(target)); return; case 7: this.Transport = ((LiveCharts.Wpf.PieSeries)(target)); return; case 8: this.Education = ((LiveCharts.Wpf.PieSeries)(target)); return; case 9: this.Entertainment = ((LiveCharts.Wpf.PieSeries)(target)); return; case 10: this.Other = ((LiveCharts.Wpf.PieSeries)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.DatePicker1 = ((System.Windows.Controls.DatePicker)(target)); return; case 2: this.DatePicker2 = ((System.Windows.Controls.DatePicker)(target)); return; case 3: this.searchProductInfoBtn = ((System.Windows.Controls.Button)(target)); #line 100 "..\..\..\..\Views\Product\Product.xaml" this.searchProductInfoBtn.Click += new System.Windows.RoutedEventHandler(this.SearchProductInfoBtn_Click); #line default #line hidden return; case 4: this.ProductInfo_Page = ((JM_GluingSystem.Common.Css.DataGridPage)(target)); return; case 5: this.ProductInfo_DgSource = ((System.Windows.Controls.DataGrid)(target)); #line 104 "..\..\..\..\Views\Product\Product.xaml" this.ProductInfo_DgSource.LoadingRow += new System.EventHandler <System.Windows.Controls.DataGridRowEventArgs>(this.ProductInfo_DgSource_LoadingRow); #line default #line hidden return; case 6: this.mychart = ((LiveCharts.Wpf.CartesianChart)(target)); return; case 7: this.myaxis = ((LiveCharts.Wpf.Axis)(target)); return; case 8: this.mytootip = ((LiveCharts.Wpf.DefaultTooltip)(target)); return; case 9: this.outputline = ((LiveCharts.Wpf.LineSeries)(target)); return; case 10: this.Qualifiedline = ((LiveCharts.Wpf.LineSeries)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.priceSeries = ((LiveCharts.Wpf.LineSeries)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 10 "..\..\..\userControls\Status.xaml" ((PrjTreino.userControls.Status)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded); #line default #line hidden return; case 2: this.messageBox = ((MaterialDesignThemes.Wpf.DialogHost)(target)); return; case 3: this.painel = ((System.Windows.Controls.StackPanel)(target)); return; case 4: this.expander = ((System.Windows.Controls.Expander)(target)); return; case 5: this.lista = ((System.Windows.Controls.ListBox)(target)); #line 33 "..\..\..\userControls\Status.xaml" this.lista.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.Lista_SelectionChanged); #line default #line hidden return; case 6: this.Nome = ((System.Windows.Controls.StackPanel)(target)); return; case 7: this.valores = ((LiveCharts.Wpf.LineSeries)(target)); return; case 8: this.labels = ((LiveCharts.Wpf.Axis)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 23 "..\..\ConstantChangesChart.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 2: this.theGauge = ((LiveCharts.Wpf.AngularGauge)(target)); return; case 3: this.theCC = ((LiveCharts.Wpf.CartesianChart)(target)); return; case 4: this.lsPulse = ((LiveCharts.Wpf.StepLineSeries)(target)); return; case 5: this.lsEfficiency = ((LiveCharts.Wpf.LineSeries)(target)); return; case 6: this.lsRed = ((LiveCharts.Wpf.LineSeries)(target)); return; case 7: this.lsGreen = ((LiveCharts.Wpf.LineSeries)(target)); return; case 8: this.lsBlue = ((LiveCharts.Wpf.LineSeries)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.priceLineSeries = ((LiveCharts.Wpf.LineSeries)(target)); return; case 2: this.upperBandLineSeries = ((LiveCharts.Wpf.LineSeries)(target)); return; case 3: this.middleBandMASeries = ((LiveCharts.Wpf.LineSeries)(target)); return; case 4: this.lowerBandMASeries = ((LiveCharts.Wpf.LineSeries)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.TorqueValues = ((LiveCharts.Wpf.LineSeries)(target)); return; case 2: this.RpmValues = ((LiveCharts.Wpf.LineSeries)(target)); return; case 3: this.TempValues = ((LiveCharts.Wpf.LineSeries)(target)); return; case 4: this.Rpm_cValues = ((LiveCharts.Wpf.LineSeries)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.titulo = ((System.Windows.Controls.Label)(target)); return; case 2: this.pedidosDia = ((System.Windows.Controls.DatePicker)(target)); return; case 3: this.chart1 = ((LiveCharts.Wpf.CartesianChart)(target)); return; case 4: this.serieP = ((LiveCharts.Wpf.LineSeries)(target)); return; case 5: this.g2_eje_x = ((LiveCharts.Wpf.Axis)(target)); return; case 6: this.pastel = ((LiveCharts.Wpf.PieChart)(target)); return; case 7: #line 67 "..\..\Estadisticas.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Calcular_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 10 "..\..\ChartPage.xaml" ((CleanerProject.ChartPage)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Page_Loaded); #line default #line hidden return; case 2: this.userChart = ((LiveCharts.Wpf.CartesianChart)(target)); #line 13 "..\..\ChartPage.xaml" this.userChart.Loaded += new System.Windows.RoutedEventHandler(this.UserChart_Loaded); #line default #line hidden return; case 3: this.lineSerie = ((LiveCharts.Wpf.LineSeries)(target)); return; case 4: this.buttonStart = ((System.Windows.Controls.Button)(target)); #line 35 "..\..\ChartPage.xaml" this.buttonStart.Click += new System.Windows.RoutedEventHandler(this.ButtonStart_Click); #line default #line hidden return; case 5: this.buttonStop = ((System.Windows.Controls.Button)(target)); #line 36 "..\..\ChartPage.xaml" this.buttonStop.Click += new System.Windows.RoutedEventHandler(this.ButtonStop_Click); #line default #line hidden return; case 6: this.buttonSets = ((System.Windows.Controls.Button)(target)); #line 37 "..\..\ChartPage.xaml" this.buttonSets.Click += new System.Windows.RoutedEventHandler(this.ButtonSets_Click); #line default #line hidden return; case 7: this.cmbValue = ((System.Windows.Controls.ComboBox)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 6 "..\..\..\OPC.xaml" ((OPC.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.xLbl = ((System.Windows.Controls.Label)(target)); return; case 3: this.yLbl = ((System.Windows.Controls.Label)(target)); return; case 4: this.zLbl = ((System.Windows.Controls.Label)(target)); return; case 5: this.StartBtn = ((System.Windows.Controls.Button)(target)); #line 34 "..\..\..\OPC.xaml" this.StartBtn.Click += new System.Windows.RoutedEventHandler(this.StartBtn_Click); #line default #line hidden return; case 6: this.OpenGLBtn = ((System.Windows.Controls.Button)(target)); #line 35 "..\..\..\OPC.xaml" this.OpenGLBtn.Click += new System.Windows.RoutedEventHandler(this.OpenGLBtn_Click); #line default #line hidden return; case 7: this.xCh = ((LiveCharts.Wpf.LineSeries)(target)); return; case 8: this.yCh = ((LiveCharts.Wpf.LineSeries)(target)); return; case 9: this.zCh = ((LiveCharts.Wpf.LineSeries)(target)); return; case 10: this.statusLbl = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.DatePicker1 = ((System.Windows.Controls.DatePicker)(target)); return; case 2: this.DatePicker2 = ((System.Windows.Controls.DatePicker)(target)); return; case 3: this.SearchWorkInfoBtn = ((System.Windows.Controls.Button)(target)); #line 96 "..\..\..\..\Views\Check\Check.xaml" this.SearchWorkInfoBtn.Click += new System.Windows.RoutedEventHandler(this.SearchWorkInfoBtn_Click); #line default #line hidden return; case 4: this.CheckInfo_Page = ((JM_GluingSystem.Common.Css.DataGridPage)(target)); return; case 5: this.testDetailsInfo = ((System.Windows.Controls.Button)(target)); #line 99 "..\..\..\..\Views\Check\Check.xaml" this.testDetailsInfo.Click += new System.Windows.RoutedEventHandler(this.TestDetailsInfoBtn_Click); #line default #line hidden return; case 6: this.CheckInfo_DgSource = ((System.Windows.Controls.DataGrid)(target)); return; case 7: this.mychart = ((LiveCharts.Wpf.CartesianChart)(target)); return; case 8: this.myaxis = ((LiveCharts.Wpf.Axis)(target)); return; case 9: this.mytootip = ((LiveCharts.Wpf.DefaultTooltip)(target)); return; case 10: this.BuckleDislocation_LeftAndRightLine = ((LiveCharts.Wpf.LineSeries)(target)); return; case 11: this.BuckleDislocation_TopAndBottomLine = ((LiveCharts.Wpf.LineSeries)(target)); return; case 12: this.RightFitLine = ((LiveCharts.Wpf.LineSeries)(target)); return; case 13: this.WideTemplateLine = ((LiveCharts.Wpf.LineSeries)(target)); return; case 14: this.WireResidualLine = ((LiveCharts.Wpf.LineSeries)(target)); return; case 15: this.MeltThroughLine = ((LiveCharts.Wpf.LineSeries)(target)); return; case 16: this.SolderJointOversizeLine = ((LiveCharts.Wpf.LineSeries)(target)); return; case 17: this.WeldJointOversizeLine = ((LiveCharts.Wpf.LineSeries)(target)); return; case 18: this.borderBody = ((System.Windows.Controls.Border)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.tb1 = ((System.Windows.Controls.TextBox)(target)); return; case 2: this.tb2 = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.tb3 = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.button1 = ((System.Windows.Controls.Button)(target)); #line 45 "..\..\MainWindow.xaml" this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click); #line default #line hidden return; case 5: this.button2 = ((System.Windows.Controls.Button)(target)); #line 46 "..\..\MainWindow.xaml" this.button2.Click += new System.Windows.RoutedEventHandler(this.button2_Click); #line default #line hidden return; case 6: this.tb5 = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.tb6 = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.cbx1 = ((System.Windows.Controls.CheckBox)(target)); #line 50 "..\..\MainWindow.xaml" this.cbx1.Checked += new System.Windows.RoutedEventHandler(this.CheckBox1_Checked); #line default #line hidden #line 50 "..\..\MainWindow.xaml" this.cbx1.Unchecked += new System.Windows.RoutedEventHandler(this.CheckBox1_Unchecked); #line default #line hidden return; case 9: this.cbx2 = ((System.Windows.Controls.CheckBox)(target)); #line 51 "..\..\MainWindow.xaml" this.cbx2.Checked += new System.Windows.RoutedEventHandler(this.CheckBox2_Checked); #line default #line hidden #line 51 "..\..\MainWindow.xaml" this.cbx2.Unchecked += new System.Windows.RoutedEventHandler(this.CheckBox2_Unchecked); #line default #line hidden return; case 10: this.Chart1 = ((LiveCharts.Wpf.CartesianChart)(target)); #line 52 "..\..\MainWindow.xaml" this.Chart1.Loaded += new System.Windows.RoutedEventHandler(this.CartesianChart_Loaded); #line default #line hidden return; case 11: this.Series1 = ((LiveCharts.Wpf.LineSeries)(target)); return; case 12: this.Series2 = ((LiveCharts.Wpf.StepLineSeries)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.TempGauge = ((LiveCharts.Wpf.AngularGauge)(target)); return; case 2: this.SampleGauge = ((System.Windows.Controls.Button)(target)); #line 54 "..\..\MainWindow.xaml" this.SampleGauge.Click += new System.Windows.RoutedEventHandler(this.Sample_Click); #line default #line hidden return; case 3: this.LightGauge = ((LiveCharts.Wpf.AngularGauge)(target)); return; case 4: this.LEDred = ((System.Windows.Controls.Button)(target)); #line 67 "..\..\MainWindow.xaml" this.LEDred.Click += new System.Windows.RoutedEventHandler(this.LEDred_Click); #line default #line hidden return; case 5: this.LEDgreen = ((System.Windows.Controls.Button)(target)); #line 68 "..\..\MainWindow.xaml" this.LEDgreen.Click += new System.Windows.RoutedEventHandler(this.LEDgreen_Click); #line default #line hidden return; case 6: this.LEDblue = ((System.Windows.Controls.Button)(target)); #line 69 "..\..\MainWindow.xaml" this.LEDblue.Click += new System.Windows.RoutedEventHandler(this.LEDblue_Click); #line default #line hidden return; case 7: this.LEDmagenta = ((System.Windows.Controls.Button)(target)); #line 70 "..\..\MainWindow.xaml" this.LEDmagenta.Click += new System.Windows.RoutedEventHandler(this.LEDmagenta_Click); #line default #line hidden return; case 8: this.LEDcyan = ((System.Windows.Controls.Button)(target)); #line 71 "..\..\MainWindow.xaml" this.LEDcyan.Click += new System.Windows.RoutedEventHandler(this.LEDcyan_Click); #line default #line hidden return; case 9: this.LEDyellow = ((System.Windows.Controls.Button)(target)); #line 72 "..\..\MainWindow.xaml" this.LEDyellow.Click += new System.Windows.RoutedEventHandler(this.LEDyellow_Click); #line default #line hidden return; case 10: this.LEDwhite = ((System.Windows.Controls.Button)(target)); #line 73 "..\..\MainWindow.xaml" this.LEDwhite.Click += new System.Windows.RoutedEventHandler(this.LEDwhite_Click); #line default #line hidden return; case 11: #line 74 "..\..\MainWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1); #line default #line hidden return; case 12: this.console = ((System.Windows.Controls.TextBox)(target)); return; case 13: this.Dataset = ((System.Windows.Controls.DataGrid)(target)); return; case 14: this.SayHello = ((System.Windows.Controls.Button)(target)); #line 88 "..\..\MainWindow.xaml" this.SayHello.Click += new System.Windows.RoutedEventHandler(this.SayHello_Click); #line default #line hidden return; case 15: this.Sample = ((System.Windows.Controls.Button)(target)); #line 89 "..\..\MainWindow.xaml" this.Sample.Click += new System.Windows.RoutedEventHandler(this.Sample_Click); #line default #line hidden return; case 16: this.Disconnect = ((System.Windows.Controls.Button)(target)); #line 90 "..\..\MainWindow.xaml" this.Disconnect.Click += new System.Windows.RoutedEventHandler(this.Disconnect_Click); #line default #line hidden return; case 17: this.Connect = ((System.Windows.Controls.Button)(target)); #line 91 "..\..\MainWindow.xaml" this.Connect.Click += new System.Windows.RoutedEventHandler(this.Connect_Click); #line default #line hidden return; case 18: this.TempX = ((LiveCharts.Wpf.Axis)(target)); return; case 19: this.LightX = ((LiveCharts.Wpf.Axis)(target)); return; case 20: this.TimeDateChart = ((LiveCharts.Wpf.Axis)(target)); return; case 21: this.TempChart = ((LiveCharts.Wpf.LineSeries)(target)); return; case 22: this.LightChart = ((LiveCharts.Wpf.LineSeries)(target)); return; } this._contentLoaded = true; }
private void InitializeCartesianChart() { const double step = 0.5; const double factor = 1000; const int maxStep = 2; var temp = 0.0; var points = new List <Points> { new Points() { Y = ComputeService.GetPhaseFrequencyСharacteristic(temp), X = 1 } }; while (temp < maxStep) { temp += step; var frequency = ComputeService.GetPhaseFrequencyСharacteristic(temp * factor); points.Add(new Points() { X = temp, Y = frequency }); } var chartValues = new ChartValues <double>(); foreach (var point in points) { chartValues.Add(point.Y); } var series = new LiveCharts.Wpf.LineSeries() { Title = "АЧХ", Values = chartValues }; //cartesianChartShowData.Series = new SeriesCollection //{ // new LiveCharts.Wpf.LineSeries // { // Title = "АЧХ", // Values = new ChartValues<double> {10, 6, 5, 2, 7} // } //}; cartesianChartShowData.Series = new SeriesCollection() { series }; cartesianChartShowData.AxisX.Add(new LiveCharts.Wpf.Axis { Title = "Frequency", Labels = new[] { "1", "0,5 * 10^3", "1 * 10^3", "1,5 * 10^3", "2 * 10^3" } }); cartesianChartShowData.AxisY.Add(new LiveCharts.Wpf.Axis { Title = "Sales", LabelFormatter = value => value.ToString(CultureInfo.InvariantCulture) }); cartesianChartShowData.LegendLocation = LegendLocation.Right; }