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


C# LinearAxis类代码示例

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


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

示例1: LineSerieswithcustomTrackerFormatString

 public static PlotModel LineSerieswithcustomTrackerFormatString()
 {
     var plotModel1 = new PlotModel();
     plotModel1.Subtitle = "TrackerFormatString = \"X={2:0.0} Y={4:0.0}\"";
     plotModel1.Title = "LineSeries with custom TrackerFormatString";
     var linearAxis1 = new LinearAxis();
     linearAxis1.Position = AxisPosition.Bottom;
     plotModel1.Axes.Add(linearAxis1);
     var linearAxis2 = new LinearAxis();
     plotModel1.Axes.Add(linearAxis2);
     var lineSeries1 = new LineSeries();
     lineSeries1.TrackerFormatString = "X={2:0.0} Y={4:0.0}";
     lineSeries1.Points.Add(new DataPoint(0, 20));
     lineSeries1.Points.Add(new DataPoint(10, 21));
     lineSeries1.Points.Add(new DataPoint(20, 24));
     lineSeries1.Points.Add(new DataPoint(30, 22));
     lineSeries1.Points.Add(new DataPoint(40, 17));
     lineSeries1.Points.Add(new DataPoint(50, 21));
     lineSeries1.Points.Add(new DataPoint(60, 23));
     lineSeries1.Points.Add(new DataPoint(70, 27));
     lineSeries1.Points.Add(new DataPoint(80, 27));
     lineSeries1.Points.Add(new DataPoint(90, 22));
     lineSeries1.Points.Add(new DataPoint(100, 25));
     plotModel1.Series.Add(lineSeries1);
     return plotModel1;
 }
开发者ID:airaultf,项目名称:ProjetDotNet,代码行数:26,代码来源:Window1.xaml.cs

示例2: ViewChart

        public ViewChart(Group current)
        {
            this.model = new PlotModel("Postęp nauki dla "+current.Name);
            LineSeries basicSerie =  new LineSeries("Postęp nauki");
            LinearAxis ax = new LinearAxis();
            ax.Unit = "%";
            ax.Title = "Poprawne odpowiedzi";
            model.Axes.Add(ax);

            SqlAccess sql = new SqlAccess();
            basicSerie.Smooth = true;
            List<double> list = sql.GetStatsForGroup(current);
            int i = 1;
            if(list.Count>0)
            basicSerie.Points.Add(new DataPoint(0.0,0));
            basicSerie.MarkerType = MarkerType.Circle;
            basicSerie.MarkerSize = 3;
            basicSerie.SelectionMode = SelectionMode.Single;

            foreach (double d in list)
            {

                basicSerie.Points.Add(new DataPoint(i,d));
                i++;
            }

            this.model.Series.Add(basicSerie);
        }
开发者ID:kajzur,项目名称:language-worker,代码行数:28,代码来源:ViewChart.cs

示例3: 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

示例4: SetUpLegend

        /// <summary>
        /// Funkcja przygotowujaca układ współrzędnych, ustala skale osi, tytuły, legendę i kolorystykę układu
        /// </summary>
        /// <param name="xMax"></param>
        /// <param name="yMax"></param>
        /// <param name="titleX"></param>
        /// <param name="titleY"></param>
        public void SetUpLegend(double xMax, double yMax, string titleX, string titleY)
        {
            plotModel.LegendTitle = "Legenda";
            plotModel.LegendOrientation = LegendOrientation.Horizontal;
            plotModel.LegendPlacement = LegendPlacement.Outside;
            plotModel.LegendPosition = LegendPosition.BottomRight;
            plotModel.LegendBackground = OxyColor.FromAColor(200, OxyPlot.OxyColors.White);
            plotModel.LegendBorder = OxyColors.Black;

            var xAxis = new LinearAxis()
            {
                Position = AxisPosition.Bottom,
                Title = titleX,
                Minimum = 0,
                Maximum = xMax
            };
            plotModel.Axes.Add(xAxis);

            var yAxis = new LinearAxis()
            {
                Position = AxisPosition.Left,
                Title = titleY,
                Minimum = 0,
                Maximum = yMax
            };
            plotModel.Axes.Add(yAxis);
        }
开发者ID:Justa3122,项目名称:DzienniczekDietetyczny,代码行数:34,代码来源:OxyPlotModel.cs

示例5: BarChartMono

        public BarChartMono()
        {
            InitializeComponent();

            plotView1.Dock = DockStyle.Fill;
            plotView1.Model = new PlotModel();

            chart = plotView1.Model;
            chart.IsLegendVisible = false;
            chart.Background = OxyColors.White;

            XAxis = new CategoryAxis();
            XAxis.MajorGridlineThickness = 0;
            XAxis.Position = AxisPosition.Bottom;

            YAxis = new LinearAxis();
            YAxis.MajorGridlineThickness = 0;
            YAxis.TextColor = OxyColors.Transparent;
            YAxis.TickStyle = OxyPlot.Axes.TickStyle.None;

            // Chart area.
            //chartArea.AxisX.MajorGrid.LineWidth = 0;
            //chartArea.AxisY.MajorGrid.LineWidth = 0;

            //chartArea.AxisX.IsLabelAutoFit = true;
            //chartArea.AxisX.Interval = 1;

            //chartArea.AxisY.LabelStyle.Enabled = false;
            //chartArea.AxisY.IsLabelAutoFit = true;

            chart.Axes.Add(XAxis);
            chart.Axes.Add(YAxis);
        }
开发者ID:blake2002,项目名称:DatabaseBenchmark,代码行数:33,代码来源:BarChart.Mono.cs

示例6: 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

示例7: 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

示例8: 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

示例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();
			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

示例10: MsFeatureSpectraViewModel

        public MsFeatureSpectraViewModel(MSFeatureLight feature, IEnumerable<XYData> spectrum, string name)
            : base(name)
        {
            MsmsDistanceLower = 1.5;
            MsmsDistanceUpper = 1.5;

            var mzAxis = new LinearAxis
            {
                Position = AxisPosition.Bottom,
                IsZoomEnabled = true,
                MinorStep = 1,
                AbsoluteMinimum = 0
            };

            var intensityAxis = new LinearAxis
            {
                IsPanEnabled = false,
                Position = AxisPosition.Left,
                IsZoomEnabled = true,
                Minimum = 0,
                AbsoluteMinimum = 0,
                UseSuperExponentialFormat = true
            };
            Model.Axes.Add(mzAxis);
            Model.Axes.Add(intensityAxis);

            m_mzAxis = mzAxis;
            PlotSpectra(feature, spectrum);
        }
开发者ID:msdna,项目名称:MultiAlign,代码行数:29,代码来源:MsFeatureSpectraViewModel.cs

示例11: CreateModel

 private PlotModel CreateModel(String title)
 {
     var plotModel1 = new PlotModel();
     plotModel1.Title = title;
     var linearAxis1 = new DateTimeAxis(AxisPosition.Bottom, _start, _start + TimeSpan.FromMinutes(1));
     linearAxis1.MajorGridlineStyle = LineStyle.Solid;
     linearAxis1.MinorGridlineStyle = LineStyle.Dot;
     plotModel1.Axes.Add(linearAxis1);
     var linearAxis2 = new LinearAxis(AxisPosition.Left, "Value");
     linearAxis2.MajorGridlineStyle = LineStyle.Solid;
     linearAxis2.MinorGridlineStyle = LineStyle.Dot;
     plotModel1.Axes.Add(linearAxis2);
     plotModel1.Series.Add(new LineSeries()
     {
         Title = "X",
         Points = new List<IDataPoint>()
     });
     plotModel1.Series.Add(new LineSeries()
     {
         Title = "Y",
         Points = new List<IDataPoint>()
     });
     plotModel1.Series.Add(new LineSeries()
     {
         Title = "Z",
         Points = new List<IDataPoint>()
     });
     return plotModel1;
 }
开发者ID:korken89,项目名称:KFlyConfig2,代码行数:29,代码来源:SensorValuesWindow.xaml.cs

示例12: createChart

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

			//Create the area series and attach axes and value bindings.
			AreaSeries areaSeries = new AreaSeries();

			areaSeries.ValueBinding  = new ValueBinding();
			areaSeries.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.LabelInterval = 10;
			horizontalAxis.LabelFitMode = AxisLabelFitMode.MultiLine;
			areaSeries.VerticalAxis = verticalAxis;
			areaSeries.HorizontalAxis = horizontalAxis;

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

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

			ChartPanAndZoomBehavior pzBehavior = new ChartPanAndZoomBehavior();

			pzBehavior.PanMode = ChartPanZoomMode.Both;
			pzBehavior.ZoomMode = ChartPanZoomMode.Both;

			chart.Behaviors.Add(pzBehavior);

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

示例13: createChart

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

			//Create the scatter bubble series and attach axes and value bindings.
			ScatterBubbleSeries scatterBubbleSeries = new ScatterBubbleSeries();
			scatterBubbleSeries.BubbleScale = 1000;


			scatterBubbleSeries.XValueBinding = new XValueBinding();
			scatterBubbleSeries.YValueBinding = new YValueBinding();
			scatterBubbleSeries.BubbleSizeBinding = new AreaValueBinding();

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

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

			//Add series to chart
			chart.Series.Add(scatterBubbleSeries);
			return chart;
		}
开发者ID:bmccool,项目名称:Android-samples,代码行数:28,代码来源:ScatterBubbleSeriesFragment.cs

示例14: PlotViewModel

        public PlotViewModel(LineMode mode, int dataPointsCount, Axis yAxis)
        {
            Mode = mode;
            DataPointsCount = dataPointsCount;
            _series = new Dictionary<string, LineSeries>();
            _lastPointOfSeries = new Dictionary<string, DataPoint>();

            LinearAxis xAxis = new LinearAxis();
            xAxis.Position = AxisPosition.Bottom;
            xAxis.Title = "Time";

            yAxis.Position = AxisPosition.Left;
            yAxis.Title = "Values";

            var plot = new PlotModel
            {
                Title = Title,
                TitleHorizontalAlignment = TitleHorizontalAlignment.CenteredWithinPlotArea,
                LegendOrientation = LegendOrientation.Horizontal,
                LegendPlacement = LegendPlacement.Outside,
                LegendPosition = LegendPosition.TopCenter
            };

            plot.Axes.Add(xAxis);
            plot.Axes.Add(yAxis);

            Plot = plot;
        }
开发者ID:HukehrsEngineering,项目名称:FlightDisplay,代码行数:28,代码来源:PlotViewModel.cs

示例15: XicViewModel

        public XicViewModel(IEnumerable<UMCLight> features, string name)
            : base(name)
        {
            var intensityAxis = new LinearAxis
            {
                Position = AxisPosition.Left,
                IsPanEnabled = false,
                IsZoomEnabled = false,
                AbsoluteMinimum = 0,
                UseSuperExponentialFormat = true,
                Title = "Intensity"
            };

            var scanAxis = new LinearAxis
            {
                Position = AxisPosition.Bottom,
                IsZoomEnabled = true,
                Title = "Scan"
            };
            Model.Axes.Add(scanAxis);
            Model.Axes.Add(intensityAxis);

            Model.MouseDown += Model_MouseDown;
            Model.MouseMove += Model_MouseMove;
            Model.MouseUp += Model_MouseUp;
            PlotFeatures(features);
        }
开发者ID:msdna,项目名称:MultiAlign,代码行数:27,代码来源:XicViewModel.cs


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