当前位置: 首页>>代码示例>>C#>>正文


C# BarSeries类代码示例

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


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

示例1: CargarFormularioChartPorSexo

 private void CargarFormularioChartPorSexo()
 {
     //conexionBD.Add(dataSource);
     //conexionBD.Add(initialCatalog);
     //conexionBD.Add(user);
     //conexionBD.Add(password);
     rcView.Series.Clear();
     BarSeries barSeries = new BarSeries("Performance", "RepresentativeName");
     barSeries.Name = "Q1";
     BarSeries barSeries2 = new BarSeries("Performance", "RepresentativeName");
     barSeries2.Name = "Q2";
     BarSeries barSeries3 = new BarSeries("Performance", "RepresentativeName");
     barSeries3.Name = "Q2";
     SisOxibariterapiaDataSetTableAdapters.spr_ReporteEnfermedadesPorSexoTableAdapter da = new SisOxibariterapiaDataSetTableAdapters.spr_ReporteEnfermedadesPorSexoTableAdapter();
     SisOxibariterapiaDataSet.spr_ReporteEnfermedadesPorSexoDataTable dt = new WinUI.SisOxibariterapiaDataSet.spr_ReporteEnfermedadesPorSexoDataTable();
     da.Connection.ConnectionString = cadenaConexion;
     da.Fill(dt);
     foreach (DataRow dr in dt.Rows)
     {
         barSeries.DataPoints.Add(new CategoricalDataPoint(Convert.ToDouble(dr["Paciente"].ToString()), dr["nombre"].ToString()));
         barSeries.ShowLabels = true;
         barSeries2.DataPoints.Add(new CategoricalDataPoint(Convert.ToDouble(dr["Femenino"].ToString()), dr["nombre"].ToString()));
         barSeries3.DataPoints.Add(new CategoricalDataPoint(Convert.ToDouble(dr["Masculino"].ToString()), dr["nombre"].ToString()));
         barSeries2.ShowLabels = true;
         barSeries3.ShowLabels = true;
     }
     rcView.View.Palette = KnownPalette.Cold;
     //rcView.ShowToolTip = true;
     this.rcView.Series.Add(barSeries);
     this.rcView.Series.Add(barSeries2);
     this.rcView.Series.Add(barSeries3);
     pbLeyenda.Image = global::SisOxi.WinUI.Properties.Resources.LeyendaSexo1;
 }
开发者ID:hatredlab,项目名称:SisOxi2.0.Copia,代码行数:33,代码来源:ReportesUI.cs

示例2: OnStrategyStart

	public override void OnStrategyStart()
	{
		series = new BarSeries();

		if (VolatilityExitEnabled || VolatilityBarrierEnabled)
		{
			rangeSeries = new TimeSeries();
			
			rangeSMA = new SMA(rangeSeries, VolatilitySMALength);
		}
		
		if (TickBarrierEnabled)
			barrier = TickSize * BarrierSize;
		
		lowestLowSeries   = new TimeSeries();
		highestHighSeries = new TimeSeries();		
		channelLowSeries  = new TimeSeries();
		channelHighSeries = new TimeSeries();
		
		lowestLowSeries  .Color = Color.Blue;
		highestHighSeries.Color = Color.Blue;
		channelLowSeries .Color = Color.Brown;
		channelHighSeries.Color = Color.Brown;
		
		Draw(lowestLowSeries  , 0);
		Draw(highestHighSeries, 0);
		Draw(channelLowSeries , 0);
		Draw(channelHighSeries, 0);
	}
开发者ID:heber,项目名称:FreeOQ,代码行数:29,代码来源:code.cs

示例3: createChart

        private RadCartesianChartView createChart()
        {
            //Create the Chart View
            RadCartesianChartView chart = new RadCartesianChartView(this.Activity);

            //Create the bar series and attach axes and value bindings.
            BarSeries barSeries = new BarSeries();

            barSeries.ValueBinding  = new ValueBinding();
            barSeries.CategoryBinding = new CategoryBinding();

            LinearAxis verticalAxis = new LinearAxis();
            //The values in the linear axis will not have values after the decimal point.
            verticalAxis.LabelFormat = "%.0f";
            CategoricalAxis horizontalAxis = new CategoricalAxis();
            barSeries.VerticalAxis = verticalAxis;
            barSeries.HorizontalAxis = horizontalAxis;

            //Bind series to data
            barSeries.Data  = this.getData();

            //Add series to chart
            chart.Series.Add(barSeries);

            CartesianPlotBandAnnotation annotation = new CartesianPlotBandAnnotation(verticalAxis, 6, 8);
            chart.Annotations.Add(annotation);
            annotation.FillColor = Color.Argb(150, 0, 148, 255);
            annotation.StrokeColor = Color.Argb(150, 0, 74, 127);
            annotation.StrokeColor = 4;
            annotation.ZIndex = 1001;

            return chart;
        }
开发者ID:camlt,项目名称:Android-samples,代码行数:33,代码来源:GridLineAnnotationFragment.cs

示例4: MetroWindow_Loaded

        private void MetroWindow_Loaded(object sender, RoutedEventArgs e)
        {
            if (Datos == null || Datos.Count() == 0)
            {
                return;
            }

            var plotModel1 = new PlotModel();
            plotModel1.Title = "Idiomas";

            var categoryAxis1 = new CategoryAxis();
            categoryAxis1.Position = AxisPosition.Left;
            plotModel1.Axes.Add(categoryAxis1);

            var linearAxis1 = new LinearAxis();
            linearAxis1.AxislineStyle = LineStyle.Solid;
            linearAxis1.Position = AxisPosition.Bottom;
            plotModel1.Axes.Add(linearAxis1);
            var barSeries1 = new BarSeries();

            foreach (var item in Datos)
            {
                categoryAxis1.ActualLabels.Add(item.Idioma);
                barSeries1.Items.Add(new BarItem(item.Certeza));
            }

            plotModel1.Series.Add(barSeries1);

            Grafica.Model = plotModel1;
        }
开发者ID:umggt,项目名称:lang-detector,代码行数:30,代码来源:MasInfoWindow.xaml.cs

示例5: PerformanceChart_Loaded

        void PerformanceChart_Loaded(object sender, RoutedEventArgs e)
        {
            if (radChart.DataContext != null)
            {
                Employee employee = (Employee)radChart.DataContext;

                if (radChart.Series.Count == 0)
                {
					radChart.HorizontalAxis = new DateTimeCategoricalAxis () { LabelFormat = "dd/MM" };
					radChart.VerticalAxis = new LinearAxis() { LabelFormat = "C0" };


                    IEnumerable<Order> orders = (from o in employee.Orders
                                                  orderby o.OrderDate
                                                  select o).Skip(employee.Orders.Count() - 10);

					BarSeries series = new BarSeries();

                    foreach (Order order in orders)
                    {
                        CategoricalDataPoint dataPoint = new CategoricalDataPoint();
                        dataPoint.Value = (from orderDetail in order.Details
                                                     select orderDetail.Quantity * orderDetail.UnitPrice *
                                                         (1 - orderDetail.Discount)).Sum();
						dataPoint.Category = order.OrderDate;
                        series.DataPoints.Add(dataPoint);
                    }

                    radChart.Series.Add(series);
                }
            }
        }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:32,代码来源:PerformanceChart.xaml.cs

示例6: BarSeries

        public static PlotModel BarSeries()
        {
            var model = new PlotModel
                            {
                                Title = "BarSeries",
                                LegendPlacement = LegendPlacement.Outside,
                                LegendPosition = LegendPosition.BottomCenter,
                                LegendOrientation = LegendOrientation.Horizontal,
                                LegendBorderThickness = 0
                            };

            var s1 = new BarSeries { Title = "Series 1", StrokeColor = OxyColors.Black, StrokeThickness = 1 };
            s1.Items.Add(new BarItem { Value = 25 });
            s1.Items.Add(new BarItem { Value = 137 });
            s1.Items.Add(new BarItem { Value = 18 });
            s1.Items.Add(new BarItem { Value = 40 });

            var s2 = new BarSeries { Title = "Series 2", StrokeColor = OxyColors.Black, StrokeThickness = 1 };
            s2.Items.Add(new BarItem { Value = 12 });
            s2.Items.Add(new BarItem { Value = 14 });
            s2.Items.Add(new BarItem { Value = 120 });
            s2.Items.Add(new BarItem { Value = 26 });

            var categoryAxis = new CategoryAxis { Position = AxisPosition.Left };
            categoryAxis.Labels.Add("Category A");
            categoryAxis.Labels.Add("Category B");
            categoryAxis.Labels.Add("Category C");
            categoryAxis.Labels.Add("Category D");
            var valueAxis = new LinearAxis { Position = AxisPosition.Bottom, MinimumPadding = 0, MaximumPadding = 0.06, AbsoluteMinimum = 0 };
            model.Series.Add(s1);
            model.Series.Add(s2);
            model.Axes.Add(categoryAxis);
            model.Axes.Add(valueAxis);
            return model;
        }
开发者ID:3r1k0n,项目名称:documentation-examples,代码行数:35,代码来源:BarSeriesExamples.cs

示例7: createChart

		private RadCartesianChartView createChart() {
			//Create the Chart View
			RadCartesianChartView chart = new RadCartesianChartView(this.Activity);

			LinearAxis verticalAxis = new LinearAxis();
			//The values in the linear axis will not have values after the decimal point.
			verticalAxis.LabelFormat = "%.0f";
			CategoricalAxis horizontalAxis = new CategoricalAxis();
			chart.VerticalAxis = verticalAxis;
			chart.HorizontalAxis = horizontalAxis;


			for (int i = 0; i < 3; i++) {
				//Create the bar series and attach axes and value bindings.
				BarSeries barSeries = new BarSeries();

				//We want to stack the different area series.
				barSeries.CombineMode = ChartSeriesCombineMode.Stack;

				barSeries.ValueBinding = new ValueBinding();
				barSeries.CategoryBinding = new CategoryBinding();

				//Bind series to data
				barSeries.Data = this.getData();

				//Add series to chart
				chart.Series.Add(barSeries);
			}

			return chart;
		}
开发者ID:bmccool,项目名称:Android-samples,代码行数:31,代码来源:StackBarSeriesFragment.cs

示例8: createChart

		private RadCartesianChartView createChart(){
			RadCartesianChartView chart = new RadCartesianChartView(this.Activity);

			CategoricalAxis horizontalAxis = new CategoricalAxis();
			chart.HorizontalAxis = horizontalAxis;

			LinearAxis vertical1 = new LinearAxis();
			vertical1.LabelFormat = "%.0f";

			LinearAxis vertical2 = new LinearAxis();
			vertical2.LabelFormat = "%.0f";

			BarSeries series1 = new BarSeries();

			ArrayList data = this.getData();

			series1.ValueBinding = new ValueBinding1();
			series1.CategoryBinding = new CategoryBinding();
			series1.VerticalAxis = vertical1;
			series1.Data = data;

			chart.Series.Add(series1);

			LineSeries series2 = new LineSeries();

			series2.ValueBinding = new ValueBinding2();
			series2.CategoryBinding = new CategoryBinding();
			series2.VerticalAxis = (vertical2);
			vertical2.HorizontalLocation = AxisHorizontalLocation.Right;
			series2.Data = data;

			chart.Series.Add(series2);

			return chart;
		}
开发者ID:bmccool,项目名称:Android-samples,代码行数:35,代码来源:MultipleAxesFragment.cs

示例9: createChart

		private RadCartesianChartView createChart(){
			//Create the Chart View
			RadCartesianChartView chart = new RadCartesianChartView(this.Activity);

			//Create the bar series and attach axes and value bindings.
			BarSeries barSeries = new BarSeries();

			barSeries.ValueBinding  = new ValueBinding();
			barSeries.CategoryBinding = new CategoryBinding();

			LinearAxis verticalAxis = new LinearAxis();
			//The values in the linear axis will not have values after the decimal point.
			verticalAxis.LabelFormat = "%.0f";
			CategoricalAxis horizontalAxis = new CategoricalAxis();
			horizontalAxis.LabelFitMode = AxisLabelFitMode.MultiLine;

			barSeries.VerticalAxis = verticalAxis;
			barSeries.HorizontalAxis = horizontalAxis;

			//Bind series to data
			barSeries.Data = this.getData();

			//Add series to chart
			chart.Series.Add(barSeries);

			ChartSelectionBehavior sb = new ChartSelectionBehavior();
			sb.DataPointsSelectionMode = ChartSelectionMode.Single;

			chart.Behaviors.Add(sb);

			return chart;
		}
开发者ID:bmccool,项目名称:Android-samples,代码行数:32,代码来源:SelectionBehaviorFragment.cs

示例10: SetDataSumValuesList

        public void SetDataSumValuesList(Dictionary<string, double> data, ChartBy chartBy)
        {
            // lets clear previous chart
            this.SumValuesCollection.Clear();
            this.MainChart.Series.Clear();

            // copy columns data into our observable collection
            foreach (var column in data)
            {
                this.SumValuesCollection.Add(new DataSumValuesCollection
                    {
                        new DataSumValues
                            {
                                Header = (chartBy == ChartBy.Cols ? "Column " : "Row ") + column.Key,
                                SumValues = column.Value
                            }
                    });
            }

            foreach (var item in this.SumValuesCollection)
            {
                BarSeries columnSeries = new BarSeries { SelectionMode = SelectionMode.Series };

                BindableDataSeries bindableData = new BindableDataSeries
                {
                    Title = item[0].Header,
                    ItemsSource = item,
                    XValueBinding = new Binding("SumValues"),
                    YValueBinding = new Binding("Header"),
                };
                columnSeries.DataSeries = bindableData;

                this.MainChart.Series.Add(columnSeries);
            }
        }
开发者ID:DVitinnik,项目名称:UniversityApps,代码行数:35,代码来源:BarChart.xaml.cs

示例11: createChart

		private RadCartesianChartView createChart(){
			//Create the Chart View
			RadCartesianChartView chart = new RadCartesianChartView(this.Activity);

			//Create the bar series and attach axes and value bindings.
			BarSeries barSeries = new BarSeries();

			barSeries.ValueBinding  = new ValueBinding();
			barSeries.CategoryBinding = new CategoryBinding();

			LinearAxis verticalAxis = new LinearAxis();
			//The values in the linear axis will not have values after the decimal point.
			verticalAxis.LabelFormat = "%.0f";
			CategoricalAxis horizontalAxis = new CategoricalAxis();
			barSeries.VerticalAxis = verticalAxis;
			barSeries.HorizontalAxis = horizontalAxis;

			//Bind series to data
			barSeries.Data  = this.getData();

			//Add series to chart
			chart.Series.Add(barSeries);

			CartesianGridLineAnnotation annotation = new CartesianGridLineAnnotation(verticalAxis, 3);
			chart.Annotations.Add(annotation);
			annotation.LabelHorizontalAlignment = HorizontalAlignment.Left;
			annotation.StrokeColor = Color.Argb(255, 235, 100, 32);
			annotation.StrokeWidth = 4;
			annotation.ZIndex = 1001;
			annotation.Label = "This is Grid Line annotation";

			return chart;
		}
开发者ID:bmccool,项目名称:Android-samples,代码行数:33,代码来源:GridLineAnnotationFragment.cs

示例12: GetSampleContent

 public override View GetSampleContent(Context context)
  {
      var chart = new SfChart(context);;
      chart.SetBackgroundColor(Color.White);
      chart.PrimaryAxis = new CategoryAxis();
      chart.SecondaryAxis = new NumericalAxis {Interval = 20, EdgeLabelsDrawingMode = EdgeLabelsDrawingMode.Shift};
      var series = new BarSeries
      {
          DataSource = MainPage.GetData1(),
      };
      series.DataMarker.ShowLabel = true;
      chart.Series.Add(series);
      return chart;
  }
开发者ID:IanLeatherbury,项目名称:tryfsharpforms,代码行数:14,代码来源:Bar.cs

示例13: Compress

		public BarSeries Compress(DataEntryEnumerator enumerator)
		{
			BarSeries series = new BarSeries();
			this.NewCompressedBar += delegate(object sender, CompressedBarEventArgs args)
			{
				series.Add(args.Bar);
			};
			while (enumerator.MoveNext())
			{
				this.Add(enumerator.Current);
			}
			this.Flush();
			return series;
		}
开发者ID:houzhongxu,项目名称:OpenQuant.API,代码行数:14,代码来源:BarCompressor.cs

示例14: prepareChart

		private void prepareChart() {
			CategoricalAxis horizontalAxis = new CategoricalAxis();
			this.chartView.HorizontalAxis = horizontalAxis;

			LinearAxis verticalAxis = new LinearAxis();
			verticalAxis.LabelFormat = "%.0f";
			this.chartView.VerticalAxis = verticalAxis;

			for (int i = 0; i < 5; i++){
				BarSeries series = new BarSeries();
				series.LegendTitle = "Series " + (i + 1);
				series.CategoryBinding = new CategoryBinding();
				series.ValueBinding = new ValueBinding();
				series.Data = this.getData();
				this.chartView.Series.Add(series);
			}
		}
开发者ID:bmccool,项目名称:Android-samples,代码行数:17,代码来源:ChartLegendFragment.cs

示例15: TornadoDiagram1

        public static PlotModel TornadoDiagram1()
        {
            // http://en.wikipedia.org/wiki/Tornado_diagram
            var model = new PlotModel("Tornado diagram 1") { LegendPlacement = LegendPlacement.Outside };

            var s1 = new BarSeries
                {
                    Title = "High",
                    IsStacked = true,
                    FillColor = OxyColor.FromRgb(216, 82, 85),
                    BaseValue = 7,
                    StrokeColor = OxyColors.Black,
                    StrokeThickness = 1
                };
            s1.Items.Add(new BarItem(1));
            s1.Items.Add(new BarItem(1));
            s1.Items.Add(new BarItem(4));
            s1.Items.Add(new BarItem(5));

            var s2 = new BarSeries
                {
                    Title = "Low",
                    IsStacked = true,
                    FillColor = OxyColor.FromRgb(84, 138, 209),
                    BaseValue = 7,
                    StrokeColor = OxyColors.Black,
                    StrokeThickness = 1
                };
            s2.Items.Add(new BarItem(-1));
            s2.Items.Add(new BarItem(-3));
            s2.Items.Add(new BarItem(-2));
            s2.Items.Add(new BarItem(-3));

            var categoryAxis = new CategoryAxis { Position = AxisPosition.Left };
            categoryAxis.Labels.Add("F/X rate");
            categoryAxis.Labels.Add("Inflation");
            categoryAxis.Labels.Add("Price");
            categoryAxis.Labels.Add("Conversion");
            var valueAxis = new LinearAxis(AxisPosition.Bottom) { ExtraGridlines = new[] { 7.0 } };
            model.Series.Add(s1);
            model.Series.Add(s2);
            model.Axes.Add(categoryAxis);
            model.Axes.Add(valueAxis);
            return model;
        }
开发者ID:aleksanderkobylak,项目名称:oxyplot,代码行数:45,代码来源:TornadoBarSeriesExamples.cs


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