• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# DataSeries类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DataSeries的典型用法代码示例。如果您正苦于以下问题:C# DataSeries类的具体用法?C# DataSeries怎么用?C# DataSeries使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataSeries类属于命名空间,在下文中一共展示了DataSeries类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Initialize

        protected override void Initialize()
        {
			#region Chart Features
				Add(new Plot(Color.White, PlotStyle.Line, ".panel range min"));  // invisible            
				Add(new Plot(Color.White, PlotStyle.Line, ".panel range max"));  // invisible
				Add(new Plot(Color.Cyan, PlotStyle.Line, "Stoch"));
			
				Plots[2].Pen.Width = 2;
			
				Add(new Line(Color.Gray, -60, "Lower Line"));
				Add(new Line(Color.Gray, 60, "Upper Line"));
				Add(new Line(Color.Gray, 0, "Zero Line"));
			
				Lines[0].Pen.DashStyle = DashStyle.Dash;
				Lines[1].Pen.DashStyle = DashStyle.Dash;
				Lines[2].Pen.Width = 2;
				
				CalculateOnBarClose	= false;
				Overlay				= false;
				PriceTypeSupported	= false;
				#endregion
						
			#region Series Initialization
				stoch1 = new DataSeries(this);
				stoch2 = new DataSeries(this);			
				JMAstoch1 = new DataSeries(this);
				JMAstoch2 = new DataSeries(this);
				#endregion
		}
开发者ID:ssg100,项目名称:ninjaindicators,代码行数:29,代码来源:Jurik+JMA+Double+Stoch.cs


示例2: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(Color.Orange, Name));

			cummulative		= new DataSeries(this);
			moneyFlow		= new DataSeries(this);
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:ChaikinOscillator.cs


示例3: AggregateByRange

        void AggregateByRange()
        {
            var keys = new string[] { "<4", "4-8", ">8" };

            for (int i = 0; i < 3; i++)
            {
                var ds = new DataSeries()
                {
                    ItemsSource = SampleItem.CreateSampleData(100),
                    ValueBinding = new Binding("Value"),
                    Aggregate = Aggregate.Count,
                    Label = "Sample Group " + (i + 1).ToString(),
                    AggregateGroupSelector = RangeSelector
                };
                chart.Data.Children.Add(ds);
            }

            chart.Data.ItemNames = keys;

            // style chart
            chart.View.AxisY.MajorTickThickness = 0;
            chart.View.AxisY.MinorTickThickness = 0;
            chart.View.AxisY.AxisLine = new Line() { StrokeThickness = 0 };
            chart.View.AxisX.MajorGridStrokeThickness = 0;
            chart.View.AxisX.MinorGridStrokeThickness = 0;
            chart.View.AxisX.MajorTickThickness = 0;
            chart.View.AxisX.MinorTickThickness = 0;
        }
开发者ID:mdjabirov,项目名称:C1Decompiled,代码行数:28,代码来源:AggregateRange.xaml.cs


示例4: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(Color.Blue, "EaseOfMovement"));
			Add(new Line(Color.DarkGray, 0, "ZeroLine"));

			emv = new DataSeries(this);
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:EaseOfMovement.cs


示例5: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(Color.Orange,  "HMA"));

			Overlay				= true;	// Plots the indicator on top of price
			diffSeries			= new DataSeries(this);
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:HMA.cs


示例6: Chart

        public Chart()
        {
            InitializeComponent();
            _chartByCountry.ChartType = ChartType.Line;
            _chartByProduct.ChartType = ChartType.Line;
            dataServiceClient = new DataServiceRef.NORTHWNDEntities(new Uri("http://localhost:50297/NorthWindDataService.svc/"));
            nwndQuery = dataServiceClient.Invoices;
            #region DataForCountry-Sales Chart
            var cntryslschrtdt = GetSalesByCountry(nwndQuery.ToArray().ToList());
            DataSeries amtsers = new DataSeries();
            amtsers.ValuesSource = cntryslschrtdt.ConvertAll(e => e.Amount).ToArray();
            _chartByCountry.Data.Children.Add(amtsers);
            var xvals = cntryslschrtdt.ConvertAll(e => e.Item).Distinct().ToArray();
            _chartByCountry.Data.ItemNames = xvals;
            _chartByCountry.View.AxisX.Title = CreateTextBlock("Countries");
            _chartByCountry.View.AxisX.AnnoAngle = 45;
            _chartByCountry.View.AxisY.Title = CreateTextBlock("Sales");
            #endregion

            #region DataForProduct-Sales Chart
            var pdctslchrtdt = GetSalesByProduct(nwndQuery.ToArray().ToList());
            DataSeries amtserspd = new DataSeries();
            amtserspd.ValuesSource = pdctslchrtdt.ConvertAll(e => e.Amount).ToArray();
            _chartByProduct.Data.Children.Add(amtserspd);
            var xvalspd = pdctslchrtdt.ConvertAll(e => e.Item).Distinct().ToArray();
            _chartByProduct.Data.ItemNames = xvalspd;
            _chartByProduct.View.AxisX.Title = CreateTextBlock("Product");
            _chartByProduct.View.AxisX.AnnoAngle = 45;
            _chartByProduct.View.AxisY.Title = CreateTextBlock("Sales");
            #endregion
        }
开发者ID:mdjabirov,项目名称:C1Decompiled,代码行数:31,代码来源:Chart.xaml.cs


示例7: GomOnStartUp

		protected override void GomOnStartUp()
		{
			dsOpen = new DataSeries(this, MaximumBarsLookBack.Infinite);
			dsHigh = new DataSeries(this, MaximumBarsLookBack.Infinite);
			dsLow = new DataSeries(this, MaximumBarsLookBack.Infinite);
			dsClose = new DataSeries(this, MaximumBarsLookBack.Infinite);
		}
开发者ID:ssg100,项目名称:ninjaindicators,代码行数:7,代码来源:GomCD.cs


示例8: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(new Pen(Color.Blue, 2), PlotStyle.Bar, "BOP"));

			bop					= new DataSeries(this);
			Overlay				= false;
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:BOP.cs


示例9: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(Color.Orange, "TSF"));
	
			y					= new DataSeries(this);
			Overlay				= true;
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:TSF.cs


示例10: Chart

        public Chart()
        {
            InitializeComponent();

            // Clear previous data
            C1Chart1.Data.Children.Clear();
            //IList<string> ProductNames = new List<string>();
            //IList<int> PriceX = new List<int>(); ;
            //using (var ctx = new FinancasDataContext(conn))
            //{               
            //    IQueryable<Cadastro> query = ctx.Cadastros.OrderBy(cadastro => Name);

            //    foreach (var item in query)
            //    {
            //        ProductNames.Add(item.Descricao);
            //        PriceX.Add(Convert.ToInt32(item.Valor));
            //    }
            //}
            //            // Add Data
            string[] ProductNames = { "Café", "Almoço", "Combustivel", 
     "Lazer", "Curso", "Condução", "Material", "Academia" };
            int[] PriceX = { 80, 400, 20, 60, 150, 300, 130, 500 };
            // create single series for product price
            DataSeries ds1 = new DataSeries();
            ds1.Label = "Price X";
            //set price data
            ds1.ValuesSource = PriceX;
            // add series to the chart
            C1Chart1.Data.Children.Add(ds1);
            // add item names
            C1Chart1.Data.ItemNames = ProductNames;
            // Set chart type
            C1Chart1.ChartType = ChartType.Bar;
        }
开发者ID:programadriano,项目名称:finance,代码行数:34,代码来源:Chart.xaml.cs


示例11: DataSeriesEvaluator

 public DataSeriesEvaluator(DataSeries series_)
 {
   m_name = series_.Name;
   m_dataType = series_.DataType;
   m_all = series_;
   Evaluate(series_.Dates[0], series_.Dates[series_.Dates.Length - 1]);
 }
开发者ID:heimanhon,项目名称:researchwork,代码行数:7,代码来源:DataSeriesEvaluator.cs


示例12: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Line(Color.DarkGray, 0, "Zero line"));
			Add(new Plot(Color.Orange, Name));
			
			smoothEma = new DataSeries(this);
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:PriceOscillator.cs


示例13: CalculateIndicators

 protected void CalculateIndicators()
 {
     // Init indicators
     momentumSeries = Momentum.Series(Close, momentumPeriod.ValueInt);
     DataSeries stochDSeries = StochD.Series(Bars, stochDSmooth.ValueInt, stochDPeriod.ValueInt);
     DataSeries stochKSeries = StochK.Series(Bars, stochKPeriod.ValueInt);
 }
开发者ID:eburtsev,项目名称:traderobotics,代码行数:7,代码来源:MomentumStoch.cs


示例14: OverlappingMarkedZones

        public OverlappingMarkedZones()
        {
            InitializeComponent();
            DataSeries series1 = new DataSeries()
            {
                new DataPoint(145),
                new DataPoint(132),
                new DataPoint(164),
                new DataPoint(187),
                new DataPoint(186),
                new DataPoint(131),
                new DataPoint(173),
                new DataPoint(172),
                new DataPoint(140),
                new DataPoint(129),
                new DataPoint(158),
                new DataPoint(149)
            };

            series1.Definition = new LineSeriesDefinition();
            series1.Definition.Appearance.Fill = new SolidColorBrush(Colors.Black);
            series1.Definition.Appearance.Stroke = new SolidColorBrush(Colors.Black);
            series1.Definition.Appearance.PointMark.Stroke = new SolidColorBrush(Colors.Black);
            radChart.DefaultView.ChartArea.DataSeries.Add(series1);
        }
开发者ID:JoelWeber,项目名称:xaml-sdk,代码行数:25,代码来源:OverlappingMarkedZones.xaml.cs


示例15: Initialize

        /// <summary>
        /// This method is used to configure the indicator and is called once before any bar data is loaded.
        /// </summary>
        protected override void Initialize()
        {
            Add(new Plot(new Pen(Color.LightSteelBlue, 2), "Macd"));					// plot 0
			Add(new Plot(new Pen(Color.RoyalBlue, 2), PlotStyle.Hash, "MacdUp"));		// plot 1 
			Add(new Plot(new Pen(Color.DarkRed, 2), PlotStyle.Hash, "MacdDn"));			// plot 2
			Add(new Plot(new Pen(Color.Yellow, 2), PlotStyle.Hash, "MacdNeutral"));		// plot 3
			Add(new Plot(new Pen(Color.DarkViolet, 2), "Avg"));							// plot 4
			Add(new Plot(new Pen(Color.DimGray, 2), PlotStyle.Bar, "Diff"));			// plot 5
			Add(new Plot(new Pen(Color.Teal, 2), PlotStyle.Line, "ADX"));				// plot 6
			
			Plots[0].Pen.Width = 3;
			Plots[1].Pen.Width = 6;
			Plots[2].Pen.Width = 6;
			Plots[3].Pen.Width = 6;
			Plots[4].Pen.Width = 1;
			Plots[5].Pen.Width = 2;
			Plots[6].Pen.Width = 2;
			
			Plots[4].Pen.DashStyle = DashStyle.Dash;
			
			fastEma = new DataSeries(this);
			macdAvg2 = new DataSeries(this);
			diffArr = new DataSeries(this);
			signal = new DataSeries(this);
			
			Overlay				= false;
            PriceTypeSupported	= true;
        }
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:31,代码来源:MACD_ZeroLag_Colors.cs


示例16: SolveDiffEquation

        public void SolveDiffEquation(double T, double b, double sigma, double f, int n)
        {
            try
            {
                double[] u = new double[n + 1];
                u[0] = 0;
                u[n] = 0;
                var coefficients = FindCoefficients(T, b, sigma, f, n).Reverse().ToArray();
                for (int i = 1; i < n; i++)
                {
                    double sum = 0;
                    for (int j = 1; j < n; j++)
                    {
                        double x = (double)i / n;
                        sum += coefficients[j - 1]*CourantFun(x, n, j);
                    }
                    u[i] = sum;
                }

                DataSeries<double, double> fun = new DataSeries<double, double>("u(x)");
                for (int i = 0; i < n + 1; i++)
                {
                    fun.Add(new DataPoint<double, double>() { X = (double)i / n, Y = u[i] });
                }
                exampleChart.Series[0].DataSeries = fun;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
开发者ID:DVitinnik,项目名称:UniversityApps,代码行数:31,代码来源:Graph.xaml.cs


示例17: FillWithSampleData

        public static void FillWithSampleData(DataSeries series, int numberOfItems, int sum)
        {
            int localSum = 0;

            Random random = new Random((int)(series.GetHashCode() + DateTime.Now.Ticks));

            for (int i = 0; i < numberOfItems; i++)
            {
                int randomNumber = 0;

                while (randomNumber <= 0)
                    randomNumber = random.Next(sum / numberOfItems - 3, sum / numberOfItems + 3);

                if (localSum + randomNumber > sum)
                    randomNumber = sum - localSum;

                if ((i == numberOfItems - 1) && (localSum + randomNumber < sum))
                    randomNumber = sum - localSum;

                localSum += randomNumber;

                DataPoint dataPoint = new DataPoint();
                dataPoint.YValue = randomNumber;

                series.Add(dataPoint);
            }
        }
开发者ID:nitinr708,项目名称:ProwarenessDashboard,代码行数:27,代码来源:SeriesExtensions.cs


示例18: SetNewSpan

		public void SetNewSpan(int span_)
		{
			if (m_span == span_ && m_series != null)
				return;

			if ((m_base.Data.Length - span_) <= 0)
				m_span = m_base.Data.Length;
			else
				m_span = span_;

			DataSeries[] series = new DataSeries[m_base.Data.Length - m_span + 1];
			double[] data;
			DateTime[] dates;

			for (int i = 0; i < series.Length; ++i)
			{
				data = new double[m_span];
				dates = new DateTime[m_span];

				for (int j = 0; j < m_span; ++j)
				{
					data[j] = m_base.Data[j + i];
					dates[j] = m_base.Dates[j + i];
				}
				series[i] = new DataSeries(dates, data, m_base.PeriodType, m_base.DataType);
			}

			m_series = series;

			reset();
		}
开发者ID:heimanhon,项目名称:researchwork,代码行数:31,代码来源:RollowingWindowAnal.cs


示例19: Initialize

		/// <summary>
		/// This method is used to configure the indicator and is called once before any bar data is loaded.
		/// </summary>
		protected override void Initialize()
		{
			Add(new Plot(new Pen(Color.Blue, 2), PlotStyle.Bar, "FisherTransform"));

			tmpSeries			= new DataSeries(this);
			Overlay				= false;
		}
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:10,代码来源:FisherTransform.cs


示例20: Initialize

        protected override void Initialize()
        {
			#region Chart Features
				Add(new Plot(Color.DodgerBlue, PlotStyle.Line, "RSX"));
				Add(new Plot(Color.Gray, PlotStyle.Hash, "Top Line"));
				Add(new Plot(Color.Gray, PlotStyle.Hash, "Bot Line"));
				Add(new Plot(Color.White, PlotStyle.Line, ".panel range min"));  // invisible            
				Add(new Plot(Color.White, PlotStyle.Line, ".panel range max"));  // invisible
			
				Plots[0].Pen.Width = 2;
				Plots[1].Pen.DashStyle = DashStyle.Dash;
				Plots[2].Pen.DashStyle = DashStyle.Dash;
			
				Add(new Line(Color.Gray, 50, "Mid Line"));
				Lines[0].Pen.Width = 2;
			
				CalculateOnBarClose	= false;
				Overlay				= false;
				PriceTypeSupported	= false;
				#endregion
						
			#region Series Initialization
				PriceSeries = new DataSeries(this);
				#endregion
        }
开发者ID:ssg100,项目名称:ninjaindicators,代码行数:25,代码来源:Jurik+RSX+custom.cs



注:本文中的DataSeries类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataService类代码示例发布时间:2022-05-24
下一篇:
C# DataSegment类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap