OxyPlot不显示轴winforms上的数字[如何解决bug]

时间:2015-03-24 14:20:41

标签: oxyplot

已解决删除LinearAxis等的属性

嗨,这是标准样本。在oxyplot中浏览器数字显示很好/但我在这个示例oxyplot版本2014.1.319.1中看不到它们

  public OxyPlot.WindowsForms.PlotView MyPlot;
        public Form1()
        {
            InitializeComponent();      

            this.MyPlot = new OxyPlot.WindowsForms.PlotView();
            this.SuspendLayout();             
            this.MyPlot.Dock = System.Windows.Forms.DockStyle.Fill;
            this.MyPlot.Location = new System.Drawing.Point(0, 0);
            this.MyPlot.Margin = new System.Windows.Forms.Padding(0);
            this.MyPlot.Name = "MyPlot";
            this.MyPlot.Size = new System.Drawing.Size(632, 446);
            this.MyPlot.TabIndex = 0;             
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(632, 446);
            this.Controls.Add(this.MyPlot);
            this.Name = "Form1";
            this.Text = "OxyPlot in Windows Forms";
            this.ResumeLayout(false);         
            var pm = new PlotModel
            {
                Title = "Trigonometric functions",
                Subtitle = "Example using the FunctionSeries",
                PlotType = PlotType.Cartesian,
                Background = OxyColors.White
            };
            MyPlot.Model = pm;
            MyPlot.Model.PlotType = PlotType.XY;
            MyPlot.Model.Background = OxyColor.FromArgb(0, 200, 200, 200);
            MyPlot.Model.TextColor = OxyColor.FromArgb(0, 50, 50, 50);

            var serie1 = new LineSeries { Title = "Csharp ploting with oxyplot serie 1", StrokeThickness = 2 };
            serie1.Points.Add(new DataPoint(1, 4));
            serie1.Points.Add(new DataPoint(2, 5));                
          MyPlot.Model.Series.Add(serie1);           
            LinearAxis botax = new LinearAxis(AxisPosition.Bottom);                      
            MyPlot.Model.Axes.Add(botax);

enter image description here

1 个答案:

答案 0 :(得分:0)

LinearAxis删除此属性/并尝试删除其他属性。