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

C# AxisPosition类代码示例

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

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



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

示例1: RangeColorAxis

        private static PlotModel RangeColorAxis(AxisPosition position)
        {
            int n = 1000;
            var model = new PlotModel
            {
                Title = string.Format("ScatterSeries and RangeColorAxis (n={0})", n),
                Background = OxyColors.LightGray
            };

            model.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom });
            model.Axes.Add(new LinearAxis { Position = AxisPosition.Left });

            var rca = new RangeColorAxis { Position = position, Maximum = 2, Minimum = -2 };
            rca.AddRange(0, 0.5, OxyColors.Blue);
            rca.AddRange(-0.2, -0.1, OxyColors.Red);
            model.Axes.Add(rca);

            var s1 = new ScatterSeries { MarkerType = MarkerType.Square, MarkerSize = 6, };

            var random = new Random(13);
            for (int i = 0; i < n; i++)
            {
                double x = (random.NextDouble() * 2.2) - 1.1;
                s1.Points.Add(new ScatterPoint(x, random.NextDouble()) { Value = x });
            }

            model.Series.Add(s1);
            return model;
        }
开发者ID:huoxudong125,项目名称:oxyplot,代码行数:29,代码来源:RangeColorAxisExamples.cs


示例2: Axis

 public Axis(AxisPosition pos, double minimum, double maximum)
     : this()
 {
     Position = pos;
     Minimum = minimum;
     Maximum = maximum;
 }
开发者ID:AndrewTPohlmann,项目名称:open-hardware-monitor,代码行数:7,代码来源:RangeAxis.cs


示例3: LogarithmicAxis

 public LogarithmicAxis(AxisPosition position, string title = null, double minimum = double.NaN, double maximum = double.NaN)
     : this()
 {
     this.Position = position;
     this.Title = title;
     this.Minimum = minimum;
     this.Maximum = maximum;
 }
开发者ID:Celderon,项目名称:oxyplot,代码行数:8,代码来源:LogarithmicAxis.cs


示例4: CreateRandomScatterSeriesWithColorAxisPlotModel

 private static PlotModel CreateRandomScatterSeriesWithColorAxisPlotModel(int n, OxyPalette palette, MarkerType markerType, AxisPosition colorAxisPosition, OxyColor highColor, OxyColor lowColor)
 {
     var model = new PlotModel { Title = string.Format("ScatterSeries (n={0})", n), Background = OxyColors.LightGray };
     var colorAxis = new LinearColorAxis { Position = colorAxisPosition, Palette = palette, Minimum = -1, Maximum = 1, HighColor = highColor, LowColor = lowColor };
     model.Axes.Add(colorAxis);
     model.Series.Add(CreateRandomScatterSeries(n, markerType, false, true, colorAxis));
     return model;
 }
开发者ID:benjaminrupp,项目名称:oxyplot,代码行数:8,代码来源:ScatterSeriesExamples.cs


示例5: LinearAxis

 public LinearAxis(AxisPosition position, double minimum, double maximum, double majorStep, double minorStep, string title = null)
     : this(position, title)
 {
     this.Minimum = minimum;
     this.Maximum = maximum;
     this.MajorStep = majorStep;
     this.MinorStep = minorStep;
 }
开发者ID:Celderon,项目名称:oxyplot,代码行数:8,代码来源:LinearAxis.cs


示例6: TimeSpanAxis

 public TimeSpanAxis(
     AxisPosition position,
     double minimum,
     double maximum = double.NaN,
     string title = null,
     string format = "m:ss")
     : base(position, minimum, maximum, title)
 {
     this.StringFormat = format;
 }
开发者ID:Celderon,项目名称:oxyplot,代码行数:10,代码来源:TimeSpanAxis.cs


示例7: YSeriesAxis

        /// <summary>
        /// Creates an instance of YSeriesAxis.
        /// </summary>
        /// <param name="chart"></param>
        /// <param name="series"></param>
        /// <param name="position"></param>
        public YSeriesAxis(C1Chart chart, DataSeries series, AxisPosition position)
            : base(chart, series)
        {
            AxisType = AxisType.Y;
            Position = position;

            if ((position & AxisPosition.Far) > 0)
                AnnoAngle = 90;
            else
                AnnoAngle = -90;

            MinorTickHeight = 0;
        }
开发者ID:mdjabirov,项目名称:C1Decompiled,代码行数:19,代码来源:YSeriesAxis.cs


示例8: DateTimeAxis

        public DateTimeAxis(
            AxisPosition position,
            string title = null,
            string format = null,
            DateTimeIntervalType intervalType = DateTimeIntervalType.Auto)
            : base(position, title)
        {
            this.FirstDayOfWeek = DayOfWeek.Monday;
            this.CalendarWeekRule = CalendarWeekRule.FirstFourDayWeek;

            this.StringFormat = format;
            this.IntervalType = intervalType;
        }
开发者ID:Celderon,项目名称:oxyplot,代码行数:13,代码来源:DateTimeAxis.cs


示例9: CreateRandomScatterSeriesWithColorAxisPlotModel

        public static PlotModel CreateRandomScatterSeriesWithColorAxisPlotModel(int n, OxyPalette palette, MarkerType markerType = MarkerType.Square, AxisPosition colorAxisPosition = AxisPosition.Right, OxyColor highColor = null, OxyColor lowColor = null)
        {
            var model = new PlotModel(string.Format("ScatterSeries (n={0})", n)) { Background = OxyColors.LightGray };
            model.Axes.Add(new ColorAxis { Position = colorAxisPosition, Palette = palette, Minimum = -1, Maximum = 1, HighColor = highColor, LowColor = lowColor });

            var s1 = new ScatterSeries
            {
                MarkerType = markerType,
                MarkerSize = 6,
            };
            var random = new Random();
            for (int i = 0; i < n; i++)
            {
                double x = random.NextDouble() * 2.2 - 1.1;
                s1.Points.Add(new ScatterPoint(x, random.NextDouble()) { Value = x });
            }

            model.Series.Add(s1);
            return model;
        }
开发者ID:aleksanderkobylak,项目名称:oxyplot,代码行数:20,代码来源:ScatterSeriesExamples.cs


示例10: createAxis

        private void createAxis(long id, AxisPosition pos)
        {
            ctCatAx = chart.GetCTChart().plotArea.AddNewCatAx();
            ctCatAx.AddNewAxId().val = (uint)id;
            ctCatAx.AddNewAxPos();
            ctCatAx.AddNewScaling();
            ctCatAx.AddNewCrosses();
            ctCatAx.AddNewCrossAx();
            ctCatAx.AddNewTickLblPos().val = ST_TickLblPos.nextTo;
            ctCatAx.AddNewDelete();
            ctCatAx.AddNewMajorTickMark();
            ctCatAx.AddNewMinorTickMark();

            
            this.SetPosition(pos);
            this.SetOrientation(AxisOrientation.MinToMax);
            this.SetCrosses(AxisCrosses.AutoZero);
            this.IsVisible = true;
            this.SetMajorTickMark(AxisTickMark.Cross);
            this.SetMinorTickMark(AxisTickMark.None);
        }
开发者ID:89sos98,项目名称:npoi,代码行数:21,代码来源:XSSFCategoryAxis.cs


示例11: MeasureAxisSize

 int MeasureAxisSize(AxisPosition pos)
 {
     int max = 0;
     foreach (Axis ax in axis)
         if (ax.Position == pos && ax.ShowLabels) {
             int nmax = MeasureAxisSize (ax);
             if (nmax > max) max = nmax;
         }
     return max;
 }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:10,代码来源:BasicChart.cs


示例12: DrawTicks

        void DrawTicks(Gdk.Window win, Gdk.GC gc, TickEnumerator e, AxisPosition pos, AxisDimension ad, int tickSize, bool showLabels)
        {
            int rwidth, rheight;
            win.GetSize (out rwidth, out rheight);

            Pango.Layout layout = null;

            if (showLabels) {
                layout = new Pango.Layout (this.PangoContext);
                layout.FontDescription = Pango.FontDescription.FromString ("Tahoma 8");
            }

            bool isX = pos == AxisPosition.Top || pos == AxisPosition.Bottom;
            bool isTop = pos == AxisPosition.Top || pos == AxisPosition.Right;

            double start = GetStart (ad);
            double end = GetEnd (ad);

            e.Init (GetOrigin (ad));

            while (e.CurrentValue > start)
                e.MovePrevious ();

            int lastPosLabel;
            int lastPos;
            int lastTw = 0;

            if (isX) {
                lastPosLabel = reverseXAxis ? left + width + MinLabelGapX : left - MinLabelGapX;
                lastPos = left - minTickStep*2;
            }
            else {
                lastPosLabel = reverseYAxis ? top - MinLabelGapY : rheight + MinLabelGapY;
                lastPos = top + height + minTickStep*2;
            }

            for ( ; e.CurrentValue <= end; e.MoveNext ())
            {
                int px, py;
                int tw = 0, th = 0;
                int tick = tickSize;

                GetPoint (e.CurrentValue, e.CurrentValue, out px, out py);

                if (showLabels) {
                    layout.SetMarkup (e.CurrentLabel);
                    layout.GetPixelSize (out tw, out th);
                }

                if (isX) {
                    if (Math.Abs ((long)px - (long)lastPos) < minTickStep || px < left || px > left + width)
                        continue;
                    lastPos = px;

                    bool labelFits = false;
                    if ((Math.Abs (px - lastPosLabel) - (tw/2) - (lastTw/2)) >= MinLabelGapX) {
                        lastPosLabel = px;
                        lastTw = tw;
                        labelFits = true;
                    }

                    if (isTop) {
                        if (showLabels) {
                            if (labelFits)
                                win.DrawLayout (gc, px - (tw/2), top - AreaBorderWidth - th, layout);
                            else
                                tick = tick / 2;
                        }
                        win.DrawLine (gc, px, top, px, top + tick);
                    }
                    else {
                        if (showLabels) {
                            if (labelFits)
                                win.DrawLayout (gc, px - (tw/2), top + height + AreaBorderWidth, layout);
                            else
                                tick = tick / 2;
                        }
                        win.DrawLine (gc, px, top + height, px, top + height - tick);
                    }
                }
                else {
                    if (Math.Abs ((long)lastPos - (long)py) < minTickStep || py < top || py > top + height)
                        continue;
                    lastPos = py;

                    bool labelFits = false;
                    if ((Math.Abs (py - lastPosLabel) - (th/2) - (lastTw/2)) >= MinLabelGapY) {
                        lastPosLabel = py;
                        lastTw = th;
                        labelFits = true;
                    }

                    if (isTop) {
                        if (showLabels) {
                            if (labelFits)
                                win.DrawLayout (gc, left + width + AreaBorderWidth + 1, py - (th/2), layout);
                            else
                                tick = tick / 2;
                        }
                        win.DrawLine (gc, left + width, py, left + width - tick, py);
//.........这里部分代码省略.........
开发者ID:Kalnor,项目名称:monodevelop,代码行数:101,代码来源:BasicChart.cs


示例13: AddAxis

 public void AddAxis(Axis ax, AxisPosition position)
 {
     ax.Owner = this;
     ax.Position = position;
     axis.Add (ax);
     QueueDraw ();
 }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:BasicChart.cs


示例14: CreateCategoryAxis

 public IChartAxis CreateCategoryAxis(AxisPosition pos)
 {
     long id = axis.Count + 1;
     XSSFCategoryAxis categoryAxis = new XSSFCategoryAxis(this, id, pos);
     if (axis.Count == 1)
     {
         IChartAxis ax = axis[0];
         ax.CrossAxis(categoryAxis);
         categoryAxis.CrossAxis(ax);
     }
     axis.Add(categoryAxis);
     return categoryAxis;
 }
开发者ID:eatage,项目名称:npoi,代码行数:13,代码来源:XSSFChart.cs


示例15: CreateValueAxis

 public IValueAxis CreateValueAxis(AxisPosition pos)
 {
     long id = axis.Count + 1;
     XSSFValueAxis valueAxis = new XSSFValueAxis(this, id, pos);
     if (axis.Count == 1)
     {
         IChartAxis ax = axis[0];
         ax.CrossAxis(valueAxis);
         valueAxis.CrossAxis(ax);
     }
     axis.Add(valueAxis);
     return valueAxis;
 }
开发者ID:eatage,项目名称:npoi,代码行数:13,代码来源:XSSFChart.cs


示例16: DateTimeAxis

 /// <summary>
 /// Initializes a new instance of the <see cref="DateTimeAxis" /> class.
 /// </summary>
 /// <param name="pos">The position of the axis.</param>
 /// <param name="firstDateTime">The first date/time on the axis.</param>
 /// <param name="lastDateTime">The last date/time on the axis.</param>
 /// <param name="title">The axis title.</param>
 /// <param name="format">The string format for the axis values.</param>
 /// <param name="intervalType">The interval type.</param>
 public DateTimeAxis(
 AxisPosition pos,
 DateTime firstDateTime,
 DateTime lastDateTime,
 string title = null,
 string format = null,
 DateTimeIntervalType intervalType = DateTimeIntervalType.Auto)
     : this(pos, title, format, intervalType)
 {
     this.Minimum = ToDouble(firstDateTime);
     this.Maximum = ToDouble(lastDateTime);
 }
开发者ID:aleksanderkobylak,项目名称:oxyplot,代码行数:21,代码来源:DateTimeAxis.cs


示例17: Axis

        /// <summary>
        /// Initializes a new instance of the <see cref="Axis"/> class.
        /// </summary>
        /// <param name="pos">
        /// The position of the axis.
        /// </param>
        /// <param name="minimum">
        /// The minimum value.
        /// </param>
        /// <param name="maximum">
        /// The maximum value.
        /// </param>
        /// <param name="title">
        /// The axis title.
        /// </param>
        protected Axis(AxisPosition pos, double minimum, double maximum, string title = null)
            : this()
        {
            this.Position = pos;
            this.Minimum = minimum;
            this.Maximum = maximum;

            this.AbsoluteMaximum = double.NaN;
            this.AbsoluteMinimum = double.NaN;

            this.Title = title;
        }
开发者ID:pcwiek,项目名称:PureToneAudiometer,代码行数:27,代码来源:Axis.cs


示例18: XSSFValueAxis

        public XSSFValueAxis(XSSFChart chart, long id, AxisPosition pos)
            : base(chart)
        {

            CreateAxis(id, pos);
        }
开发者ID:ctddjyds,项目名称:npoi,代码行数:6,代码来源:XSSFValueAxis.cs


示例19: XSSFCategoryAxis

        public XSSFCategoryAxis(XSSFChart chart, long id, AxisPosition pos)
            : base(chart)
        {

            createAxis(id, pos);
        }
开发者ID:89sos98,项目名称:npoi,代码行数:6,代码来源:XSSFCategoryAxis.cs


示例20: XPixelWorldLength

 /// <summary>
 /// Constructor, which defines the world pixel length together with
 /// the y-axis that should be held constant when forcing this 
 /// constraint [the other y-axis only will be moved].
 /// </summary>
 /// <param name="p">The world pixel length</param>
 /// <param name="holdFixedY">The position of this y-axis will be 
 /// held constant. The other y-axis will be moved in order to 
 /// force the constraint.</param>
 public XPixelWorldLength(double p, AxisPosition holdFixedY)
 {
     pWorldLength_ = p;
     holdFixedY_ = holdFixedY;
 }
开发者ID:parnham,项目名称:NPlot,代码行数:14,代码来源:AxesConstraint.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# AxisType类代码示例发布时间:2022-05-24
下一篇:
C# AxisDimension类代码示例发布时间: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