Esempio n. 1
0
 public ChartItem(Chart owner)
 {
     _owner               = owner;
     _values              = new ChartValueCollection(this);
     _values.AfterInsert += _values_AfterInsert;
     _values.AfterRemove += _values_AfterRemove;
 }
Esempio n. 2
0
 public void AddRange(ChartValueCollection items)
 {
     foreach (ChartValue i in items)
     {
         this.Add(i);
     }
 }
        private ChartValueCollection CreateChartValues(double[] input, double[] output)
        {
            ChartValueCollection results = new ChartValueCollection();

            for (int i = 0; i < input.Length; i++)
            {
                ChartValuesResult result = new ChartValuesResult()
                {
                    input = input[i],
                    dBm   = output[i]
                };

                results.Add(result);
            }

            return(results);
        }
        private void RequestCalculate()
        {
            double[] input = this.InitialiceInput(this.range, this.minValue, this.maxValue);

            FrecuencyResponse calc = new FrecuencyResponse();

            double[] output = calc.Calculate(input);

            ChartValueCollection results = this.CreateChartValues(input, output);

            var dataSource = new EnumerableDataSource <ChartValuesResult>(results);

            dataSource.SetXMapping(x => x.input);
            dataSource.SetYMapping(y => y.dBm);

            this.Data = dataSource;
        }
        private ChartValueCollection CreateChartValues(double[] input, double[] output)
        {
            ChartValueCollection results = new ChartValueCollection();

            for (int i = 0; i < input.Length; i++)
            {
                ChartValuesResult result = new ChartValuesResult()
                {
                    input = input[i],
                    dBm = output[i]
                };

                results.Add(result);
            }

            return results;
        }