private void IntesityOfSolarInsolationChart(Chart chart) { ChartController.Clear(chart); string seriesName = "Вт/м²"; ChartController.AddSeries(chart, seriesName, SeriesChartType.Column, Color.Orange); _sunConditionController.IntesityOfSolarInsolation(_sunConditions, out var dates, out var insolations); ChartController.Fill(chart, seriesName, dates, insolations); ChartController.AxisTitles(chart, "Дата", "Вт/м²"); }
private void DurationOfWindActivityModesChart(Chart chart) { ChartController.Clear(chart); string speedSeries = "t, год"; ChartController.AddSeries(chart, speedSeries, SeriesChartType.Column, Color.GreenYellow); _weatherController.DurationOfWindActivityModes(_weathers, out var speeds, out var speedDurations); ChartController.Fill(chart, speedSeries, speeds, speedDurations); ChartController.AxisTitles(chart, "швидкість, м/с", "t, год"); }
private void DurationOfTemperatureModesChart(Chart chart) { ChartController.Clear(chart); string temperatureSeries = "t, год"; ChartController.AddSeries(chart, temperatureSeries, SeriesChartType.Column, Color.Orange); _weatherController.DurationOfTemperatureModes(_weathers, out var temperatures, out var temperatureDurations); ChartController.Fill(chart, temperatureSeries, temperatures, temperatureDurations); ChartController.AxisTitles(chart, "T, °C", "t, год"); }
private void ElectricalConsumptionChart(Chart chart, List <double> consumptions, List <string> days) { ChartController.Clear(chart); string seriesName = DeviceTypeListBox.SelectedItem.ToString(); ChartController.AddSeries(chart, seriesName, SeriesChartType.Column, Color.DarkOrchid); ChartController.AxisTitles(chart, "Дні", "Споживання, кВт·год"); ChartController.Fill(chart, seriesName, days, consumptions); }
private void DurationOfSolarActivityModesChart(Chart chart) { ChartController.Clear(chart); string seriesName = "Тривалість режимів сонячної активності"; ChartController.AddSeries(chart, seriesName, SeriesChartType.Column, Color.DarkSeaGreen); _sunConditionController.DurationOfSolarActivityModes(_sunConditions, out var insolations, out var durations); ChartController.Fill(chart, seriesName, insolations, durations); ChartController.AxisTitles(chart, "Вт/м²", "t, год"); chart.ChartAreas[0].AxisY.Interval = 1; }
private void DurationOfElectricalLoadChart(Chart chart, List <DurationElectricalLoad> dayDurationElectricalLoads) { ChartController.Clear(chart); string seriesName = DeviceTypeListBox.SelectedItem.ToString(); ChartController.AddSeries(chart, seriesName, SeriesChartType.Column, Color.DarkOrchid); ChartController.AxisTitles(chart, "Навантаження, кВт", "Тривалість, год"); var durations = dayDurationElectricalLoads.Select(x => x.Duration).ToList(); var loads = dayDurationElectricalLoads.Select(x => x.Power).ToList(); ChartController.Fill(chart, seriesName, loads, durations); }
private void ElectricalLoadChart(Chart chart, List <ElectricalLoad> dayElectricalLoads, int selectedDayOfWeek) { ChartController.Clear(chart); string seriesName = DeviceTypeListBox.SelectedItem.ToString(); ChartController.AddSeries(chart, seriesName, SeriesChartType.Area, Color.DarkOrchid); ChartController.AxisTitles(chart, "Час", "Потужність, кВт"); ChartController.Fill(chart, seriesName, dayElectricalLoads); string stringFormat = selectedDayOfWeek == 7 ? "dddd HH:mm:ss" : "HH:mm:ss"; chart.ChartAreas[0].AxisX.LabelStyle.Format = stringFormat; }
private void SetHeatCostChart() { ChartController.Clear(CostChart); string series = "Види палива"; ChartController.AddSeries(CostChart, series, SeriesChartType.Column, Color.GreenYellow); List <string> types = _heats.Select(x => x.Name).ToList(); List <double> prices = _heats.Select(x => x.TotalPrice).ToList(); ChartController.Fill(CostChart, series, types, prices); ChartController.AxisTitles(CostChart, "Види палива", "Витрати, грн"); CostChart.Series[series].Label = "#VALY"; }
public void SetHeatProductionCorrectionChart(Chart chart) { ChartController.Clear(chart); string series = "Coefficient"; ChartController.AddSeries(chart, series, SeriesChartType.Line, Color.CornflowerBlue); List <int> temperatures = _heatPump.HeatPumpDescriptions.Select(x => x.Temperature).ToList(); List <double> heatProds = _heatPump.HeatPumpDescriptions.Select(x => x.HeatProductionCorrection).ToList(); ChartController.Fill(chart, series, temperatures, heatProds); ChartController.AxisTitles(chart, "Температура, °C", "Коефіцієнт корекції"); chart.Series[0].MarkerStyle = MarkerStyle.Star4; chart.Series[0].MarkerSize = 14; }
private void SetStoreChart() { ChartController.Clear(StoreChart); string series = "Накопичення тепла"; ChartController.AddSeries(StoreChart, series, SeriesChartType.Line, Color.Green); List <DateTime> dates = _heatStore.Records.Select(x => x.StartDate).ToList(); List <double> stores = _heatStore.Records.Select(x => x.EndEnergyAmount).ToList(); ChartController.Fill(StoreChart, series, dates, stores); ChartController.AxisTitles(StoreChart, "Дата", "Обсяги енергії у накопичувачі, кВт·год"); //StoreChart.Series[series].Label = "#VALY"; StoreChart.ChartAreas[0].AxisX.ScaleView.Zoomable = true; }
public void SetWindGenDesChart() { ChartController.Clear(WindGenChart); string series = "Power"; ChartController.AddSeries(WindGenChart, series, SeriesChartType.Line, Color.CornflowerBlue); List <int> winds = _weController.WindGenDes.Select(x => x.Wind).ToList(); List <double> powers = _weController.WindGenDes.Select(x => x.Power).ToList(); ChartController.Fill(WindGenChart, series, winds, powers); ChartController.AxisTitles(WindGenChart, "Швидкість вітру, м/с", "Потужність, кВт"); WindGenChart.Series[0].MarkerStyle = MarkerStyle.Star4; WindGenChart.Series[0].MarkerSize = 14; WindGenChart.ChartAreas[0].AxisX.Minimum = 0; }
private void SetWindChart() { ChartController.Clear(WindChart); string series = "Energy"; ChartController.AddSeries(WindChart, series, SeriesChartType.Line, Color.CornflowerBlue); List <int> winds = _weController.WindGenerations.Select(x => x.Wind).ToList(); List <double> powers = _weController.WindGenerations.Select(x => x.Energy).ToList(); ChartController.Fill(WindChart, series, winds, powers); ChartController.AxisTitles(WindChart, "Швидкість вітру, м/с", "Енергія вироблена ВЕУ, кВт∙год"); WindChart.Series[0].MarkerStyle = MarkerStyle.Star4; WindChart.Series[0].MarkerSize = 14; WindChart.ChartAreas[0].AxisX.Minimum = 0; }
private void CharacteristicHeatConsumption() { ChartController.Clear(CharacteristicChart); string temperatureSeries = "T, °C"; ChartController.AddSeries(CharacteristicChart, temperatureSeries, SeriesChartType.Line, Color.CornflowerBlue); List <int> temperatures = _heatLosses.Characteristic.Select(x => x.Temperature).ToList(); List <double> heats = _heatLosses.Characteristic.Select(x => x.Heat).ToList(); ChartController.Fill(CharacteristicChart, temperatureSeries, temperatures, heats); ChartController.AxisTitles(CharacteristicChart, "Температура, °C", "Тепловтрати, кВтˑгод"); CharacteristicChart.Series[0].MarkerStyle = MarkerStyle.Star4; CharacteristicChart.Series[0].MarkerSize = 14; SetCharacteristicTable(); }
private void TemperatureConditionChart(Chart chart) { ChartController.Clear(chart); string temperatureSeries = "T, °C"; ChartController.AddSeries(chart, temperatureSeries, SeriesChartType.Area, Color.CornflowerBlue); _weatherController.TemperatureCondition(_weathers, out var dates, out var temperatures); ChartController.Fill(chart, temperatureSeries, dates, temperatures); ChartController.AxisTitles(chart, "дата", "T, °C"); SmartLabelStyle smartLabel = new SmartLabelStyle { AllowOutsidePlotArea = LabelOutsidePlotAreaStyle.Partial, IsMarkerOverlappingAllowed = true }; chart.Series[0].SmartLabelStyle = smartLabel; }
private void SelectDevice() { _selectedDevice = DeviceTypeListBox.SelectedIndex; _selectedDeviceDayOfWeek = DeviceDayOfWeekListBox.SelectedIndex; string search = DeviceTypeListBox.SelectedItem.ToString(); _tempDeviceDayOfWeeks = _deviceController.Devices.First(x => x.Name == search).DayOfWeek.ToList(); _tempDevicePeriods = _tempDeviceDayOfWeeks[_selectedDeviceDayOfWeek].Periods.ToList(); DevicePeriodsDataGrid.ItemsSource = _tempDevicePeriods; ChartController.Clear(DevicePeriodsChart); string seriesName = _tempDevices[_selectedDevice].Name; ChartController.AddSeries(DevicePeriodsChart, seriesName, SeriesChartType.Area, Color.DarkOrchid); ChartController.AxisTitles(DevicePeriodsChart, "Час", "Потужність, кВт"); ChartController.Fill(DevicePeriodsChart, seriesName, _tempDevicePeriods, _tempDevices[_selectedDevice].Power); }
private void HeatConsumption() { ChartController.Clear(HeatChart); string temperatureSeries = "T, °C"; ChartController.AddSeries(HeatChart, temperatureSeries, SeriesChartType.Line, Color.CornflowerBlue); List <int> temperatures = _heatLosses.HeatConsumptions.Select(x => x.Temperature).ToList(); List <double> heats = _heatLosses.HeatConsumptions.Select(x => x.Heat).ToList(); ChartController.Fill(HeatChart, temperatureSeries, temperatures, heats); ChartController.AxisTitles(HeatChart, "Температура, °C", "Тепловтрати, кВт"); HeatChart.Series[0].MarkerStyle = MarkerStyle.Star4; HeatChart.Series[0].MarkerSize = 14; SetHeatConsumptionTable(); TotalConsumptionLabel.Content = $"Загальні витрати за період {_heatLosses.TotalHeatConsumption} кВт"; TotalHeatHelConsumptionLabel.Content = $"Витрати енергії на опалення та ГВП {_heatLosses.TotalHeatHelConsumption} кВт"; }
private void WindsRoseChart(Chart chart) { ChartController.Clear(chart); _weatherController.WindRose(_weathers, out var directions, out var frequencyPercents); List <string> speedSeries = _weatherController.CategoriesInfo; List <Color> colors = new List <Color> { Color.Red, Color.DarkOrange, Color.CornflowerBlue, Color.GreenYellow }; for (int i = 0; i < speedSeries.Count; i++) { ChartController.AddSeries(chart, speedSeries[i], SeriesChartType.Polar, colors[i]); ChartController.Fill(chart, speedSeries[i], directions, frequencyPercents[i]); chart.Series[speedSeries[i]].BorderWidth = 5; } List <WindRose> windRoses = _weatherController.WindRoses; for (int i = 0; i < windRoses.Count - 2; i++) { chart.Series[speedSeries[0]].Points[i].AxisLabel = windRoses[i].Direction; } chart.ChartAreas[0].AxisX.Interval = 45; //ChartController.AxisTitles(chart, "швидкість, м/с", "t, год"); }