示例#1
0
        /// <summary>
        /// Основная линия прогноза.
        /// </summary>
        private void SetOffsetLine(MainWindowVM parameter, double offset)
        {
            var lastValue     = parameter.Data.Last();
            var minOffsetList = new List <double>();

            minOffsetList.AddRange(parameter.Data);
            minOffsetList.Add(lastValue + offset);

            var lineValues = new LiveCharts.ChartValues <double>(minOffsetList);

            parameter.Lines.Add(new LineSeries()
            {
                Title          = "Fore Cast:",
                LineSmoothness = 0,
                Values         = lineValues
            });
        }
示例#2
0
        /// <summary>
        /// Линия минимального смещения.
        /// </summary>
        private static void SetMinOffsetLine(MainWindowVM parameter, double?error, double offset)
        {
            var lastValue = parameter.Data.Last();
            var minOffset = (double)((1 - error) * offset);

            var minOffsetList = new List <double>();

            minOffsetList.AddRange(parameter.Data);
            minOffsetList.Add(lastValue + minOffset);

            var lineValues = new LiveCharts.ChartValues <double>(minOffsetList);

            parameter.Lines.Add(new LineSeries()
            {
                Title          = "MinOffset:",
                LineSmoothness = 0,
                Values         = lineValues
            });

            parameter.MinValue = minOffsetList.Min() - DataConstants.OFFSET;
        }