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


C# Axis类代码示例

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


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

示例1: CartesianChart

        void PersistentChart.CreateGraph()
        {
            _employeesInCompanyChart = new CartesianChart();
            _employeesInCompanyChart.Name = "Chart";
            _employeesInCompanyChart.Series = _viewModel.SeriesCollection;
            _employeesInCompanyChart.LegendLocation = LegendLocation.Left;

            Axis AxisX = new Axis();
            AxisX.Title = "Mes";
            AxisX.Labels = _viewModel.Labels;
            _employeesInCompanyChart.AxisX.Add(AxisX);

            Axis AxisY = new Axis();
            AxisY.Title = "Empleados";
            //AxisY.LabelFormatter = _viewModel.Formatter;

            LiveCharts.Wpf.Separator sep = new LiveCharts.Wpf.Separator();
            sep.IsEnabled = false;
            sep.Step = 1;
            AxisX.Separator = sep;

            _employeesInCompanyChart.AxisY.Add(AxisY);

            GridContainer.Children.Add(_employeesInCompanyChart);
            _gContainer = GridContainer;
        }
开发者ID:yureru,项目名称:tkUI,代码行数:26,代码来源:EmployeesInCompanyView.xaml.cs

示例2: detectSelectedAxis

        /// <summary>
        /// Detectar el eje seleccionado
        /// </summary>
        public void detectSelectedAxis(TgcPickingRay pickingRay)
        {
            pickingRay.updateRay();
            Vector3 collP;

            //Buscar colision con eje con Picking
            if (TgcCollisionUtils.intersectRayAABB(pickingRay.Ray, boxX.BoundingBox, out collP))
            {
                selectedAxis = Axis.X;
                selectedAxisBox = boxX;
            }
            else if (TgcCollisionUtils.intersectRayAABB(pickingRay.Ray, boxY.BoundingBox, out collP))
            {
                selectedAxis = Axis.Y;
                selectedAxisBox = boxY;
            }
            else if (TgcCollisionUtils.intersectRayAABB(pickingRay.Ray, boxZ.BoundingBox, out collP))
            {
                selectedAxis = Axis.Z;
                selectedAxisBox = boxZ;
            }
            else
            {
                selectedAxis = Axis.None;
                selectedAxisBox = null;
            }

            //Desplazamiento inicial
            if (selectedAxis != Axis.None)
            {
                TgcD3dInput input = GuiController.Instance.D3dInput;
                initMouseP = new Vector2(input.XposRelative, input.YposRelative);
            }
        }
开发者ID:JesusHerrera,项目名称:tgc-viewer,代码行数:37,代码来源:SceneEditorTranslateGizmo.cs

示例3: On

        /// <summary>
        /// Starts a configuration for an axis change.
        /// </summary>
        /// <param name="axis">The axis for which a configuration should be added.</param>
        /// <returns>An axis action.</returns>
        public IAxisAction On(Axis axis)
        {
            var action = new AxisAction(axis);
            mAxesActions.Add(axis, action);

            return action;
        }
开发者ID:Christof,项目名称:afterglow,代码行数:12,代码来源:SlimDXMouse.cs

示例4: AttachAxes

        public void AttachAxes(IChart chart, int dimension, string[] axisLabels)
        {
            const double margin = 0.0;
            const double spaceBetweenAxes = 200;

            var horizontalHelperAxis = new Axis();
            horizontalHelperAxis.IsHelper = true;
            horizontalHelperAxis.Orientation = AxisOrientation.Horizontal;
            horizontalHelperAxis.Dimension = dimension;
            horizontalHelperAxis.Label = axisLabels[dimension];
            horizontalHelperAxis.Scale = 1.0;

            for (int i = 0; i < dimension; i++)
            {
                var axis = new Axis();
                axis.Dimension = i;
                axis.Label = axisLabels[i];
                axis.Orientation = AxisOrientation.Vertical;
                axis.OriginalValue = i * spaceBetweenAxes + margin;

                horizontalHelperAxis.DependentAxes.Add(axis);

                chart.Axes.Add(axis);
            }

            horizontalHelperAxis.Transformation.Transform(horizontalHelperAxis, horizontalHelperAxis.DependentAxes);
            chart.Axes.Add(horizontalHelperAxis);
        }
开发者ID:pwlodek,项目名称:CodeGallery,代码行数:28,代码来源:ParallelCoordinatesChartDataProvider.cs

示例5: ViewDidLoad

		public override void ViewDidLoad()
		{
			base.ViewDidLoad();

			chart.ItemsSource = FinancialData.GetFinancialDataList();

			chart.Palette = XuniPalettes.Superhero;

			chart.BindingX = "Date";

			Axis axisT = new Axis(Position.Right, chart)
			{
				Min = 0,
				Max = 150,
				MajorUnit = 10,
				Title = "Volume",
				AxisLineVisible = false,
				MajorGridVisible = false,
				MajorGridWidth = 1,
				MajorTickWidth = 0,
				TitleTextColor = new UIColor(0.984f, 0.698f, 0.345f, 1.0f),
				LabelsVisible = true
			};

			chart.AxesArray.Add(axisT);

			chart.Series.Add(new Series(chart, "Volume", "Volume") { AxisY = axisT });
			chart.Series.Add(new Series(chart, "High", "High") { ChartType = ChartType.Line });
			chart.Series.Add(new Series(chart, "Low", "Low") { ChartType = ChartType.Line });

			chart.Header = "Drag to scroll/Pinch to zoom";
			chart.ZoomMode = ZoomMode.X;
			chart.AxisX.DisplayedRange = 10;
		}
开发者ID:GoXuni,项目名称:Xamarin.iOS-Samples,代码行数:34,代码来源:ScrollingController.cs

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

示例7: AccelerateToPoint

        /// <summary>
        /// Sets the x and y acceleration of an object or group of objects to move towards a given point.
        /// </summary>
        /// <param name="objectOrGroup">The object or group of objects to move.</param>
        /// <param name="point">The point to move towards.</param>
        /// <param name="speed">The acceleration to move the object at.</param>
        /// <param name="radius">The radius extending from the point. An object will need to be within this area to accelerate. A value of 0 will not use a radius.</param>
        /// <param name="axis">The allowed movement axis of the object.</param>
        /// <param name="allowImmovable">A flag used to determine if an object set to immovable will be affected.</param>
        public static void AccelerateToPoint(GenBasic objectOrGroup, Vector2 point, float speed, float radius = 0, Axis axis = Axis.Both, bool allowImmovable = false)
        {
            if (speed != 0)
            {
                if (objectOrGroup is GenObject)
                {
                    if (allowImmovable || !(objectOrGroup as GenObject).Immovable)
                    {
                        // Get a normalized distance vector to calculate the horizontal and vertical speeds.
                        Vector2 distanceNormal = GetDistanceNormal(objectOrGroup as GenObject, point, axis);

                        if (radius <= 0)
                            (objectOrGroup as GenObject).Velocity += distanceNormal * speed * GenG.TimeStep;
                        else
                        {
                            // If the object is within the radius from the point, accelerate the object towards the point.
                            // The closer the object is to the point, the higher its acceleration will be.
                            float accelerationFactor = MathHelper.Clamp(radius - Vector2.Distance((objectOrGroup as GenObject).CenterPosition, point), 0, 1);

                            (objectOrGroup as GenObject).Velocity += distanceNormal * speed * accelerationFactor * GenG.TimeStep;
                        }
                    }
                }
                else if (objectOrGroup is GenGroup)
                {
                    foreach (GenBasic basic in (objectOrGroup as GenGroup).Members)
                        AccelerateToPoint(basic, point, speed, radius, axis, allowImmovable);
                }
            }
        }
开发者ID:GeneticSpartan,项目名称:Genetic,代码行数:39,代码来源:GenMove.cs

示例8: CursorEventArgs

		public CursorEventArgs(ChartArea chartArea, Axis axis, double newSelectionStart, double newSelectionEnd)
		{
			this.ChartArea = chartArea;
			this.Axis = axis;
			this.NewSelectionStart = newSelectionStart;
			this.NewSelectionEnd = newSelectionEnd;
		}
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:CursorEventArgs.cs

示例9: ToVector3

	public static List<Vector3> ToVector3(this List<Vector2> v2, Axis axis, float z)
	{
		List<Vector3> v = new List<Vector3>();
		for(int i = 0; i < v2.Count; i++)
			v.Add(v2[i].ToVector3(axis, z));
		return v;
	}
开发者ID:wtrebella,项目名称:Grappler,代码行数:7,代码来源:PolydrawExtensions.cs

示例10: WriteMemoryTO

 void WriteMemoryTO(ushort address, byte value)
 {
     if (address >= 0xC000)
         SystemRam[address & RamSizeMask] = value;
     else if (address == 0x6000)
         axis = ((value & 1) == 0) ? Axis.XAxis : Axis.YAxis;
 }
开发者ID:cas1993per,项目名称:bizhawk,代码行数:7,代码来源:TerebiOekaki.cs

示例11: DrawLines

	// Draw a row of lines.
	void DrawLines(int from, int to, Axis axis)
	{
		for(int lineMultiplicator = from; lineMultiplicator <= to; lineMultiplicator+=4)
		{
			DrawLine(lineMultiplicator, axis);
		}
	}
开发者ID:JulianVallee,项目名称:RTS,代码行数:8,代码来源:TerrainGrid.cs

示例12: Block

 public Block(Axis axis, Colour colour)
     : this(new List<Tuple<Axis, Colour>>()
     {
         new Tuple<Axis, Colour>(axis, colour)
     })
 {
 }
开发者ID:JakeColtman,项目名称:Kill-Sudoku-Solver,代码行数:7,代码来源:Block.cs

示例13: Chart

 public Chart(bool dateTimeAxis = true, Axis xAxis = null, Axis yAxis = null)
 {
     InitializeComponent();
     Random rand = new Random();
     if (dateTimeAxis) {
         plot.Axes.Add(new DateTimeAxis());
     }
     if (xAxis != null) {
         xAxis.Position = AxisPosition.Bottom;
         if (plot.Axes.Count() > 0) {
             plot.Axes[0] = xAxis;
         } else {
             plot.Axes.Add(xAxis);
         }
     }
     if (yAxis != null) {
         yAxis.Position = AxisPosition.Left;
         if (plot.Axes.Count() > 1) {
             plot.Axes[1] = yAxis;
         } else {
             plot.Axes.Add(yAxis);
         }
     }
     this.Root.Model = plot;
 }
开发者ID:Amichai,项目名称:FinancialData,代码行数:25,代码来源:Graph.xaml.cs

示例14: Scrollbar

        public Scrollbar(ScrollbarStyle Style, Axis Direction)
        {
            this._Style = Style;
            this._Direction = Direction;

            if (Direction == Axis.Horizontal)
            {
                this._TopLeftButton = new Button(Style.LeftButtonStyle);
                this._BottomRightButton = new Button(Style.RightButtonStyle);
            }
            else
            {
                this._TopLeftButton = new Button(Style.UpButtonStyle);
                this._BottomRightButton = new Button(Style.DownButtonStyle);
            }

            this._TopLeftButton.Click += delegate
            {
                this.Value = this._Value - this._MinorIncrement;
            };
            this._BottomRightButton.Click += delegate
            {
                this.Value = this._Value + this._MinorIncrement;
            };

            this._Value = 0.0;
            this._SliderSize = 0.1;
            this._MinorIncrement = 0.1;
            this._MajorIncrement = 0.3;
            this._Enabled = true;
        }
开发者ID:alexcmd,项目名称:OpenTKGUI,代码行数:31,代码来源:Scrollbar.cs

示例15: GetAxis

 public override float GetAxis(Axis axis, int joyNum, bool isRaw = false)
 {
     float scale = 1;
     string axisName = "";
     switch (axis)
     {
         case Axis.LeftStickX:
             axisName = getAxisName(joyNum, "X", "X", "X");
             break;
         case Axis.LeftStickY:
             axisName = getAxisName(joyNum, "Y", "Y", "Y");
             scale = -1;
             break;
         case Axis.RightStickX:
             axisName = getAxisName(joyNum, "3", "3", "3");
             break;
         case Axis.RightStickY:
             axisName = getAxisName(joyNum, "6", "4", "4");
             scale = -1;
             break;
     }
     //Debug.Log(axisName);
     if (isRaw)
     {
         return Input.GetAxisRaw(axisName) * scale;
     }
     else
     {
         return Input.GetAxis(axisName) * scale;
     }
 }
开发者ID:kkiniaes,项目名称:Fire-On-Ice,代码行数:31,代码来源:PS4ControllerWrapper.cs


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