2015-05-24 50 views
1

我正在使用Xamarin构建iOS应用程序(统一)。我也在使用TeeCharts。我有一个非常简单的条形图,其底部的轴标签旋转了90度(垂直标签)。底部的轴显示日期(10天,从今天开始)。我也将日期格式设置为“MM/dd”。TeeChart底部轴标签在iOS中被切断

这里是我的代码:

private void CreateChartUI() 
    { 
     CGColor textColor = UIColor.Black.CGColor; 

     this.Chart.Aspect.View3D = false; 
     this.Chart.Header.Text = String.Empty; 
     this.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual; 
     this.Chart.Zoom.Active = false; 
     this.Chart.Zoom.Allow = false; 
     this.Chart.Panning.Allow = ScrollModes.None; 
     this.Chart.Legend.Visible = false; 
     this.Chart.Header.Text = "Test"; 

     // Walls 
     this.Chart.Walls.Back.Pen.Visible = false; 
     this.Chart.Walls.Back.Gradient.Visible = false; 
     this.Chart.Walls.Back.Color = UIColor.Gray.CGColor; 

     // Left axis 
     this.Chart.Axes.Left.AxisPen.Visible = false; 
     this.Chart.Axes.Left.Grid.Visible = false; 
     this.Chart.Axes.Left.Ticks.Visible = false; 
     this.Chart.Axes.Left.MinorTicks.Visible = false; 
     this.Chart.Axes.Left.MinorGrid.Visible = false; 
     this.Chart.Axes.Left.Grid.Style = Steema.TeeChart.Drawing.DashStyle.Solid; 
     this.Chart.Axes.Left.Grid.Color = UIColor.White.CGColor; 
     this.Chart.Axes.Left.Grid.Width = 2; 
     this.Chart.Axes.Left.Labels.Font.Color = textColor; 
     this.Chart.Axes.Left.MaximumOffset = 30; 

     // Bottom axis 
     this.Chart.Axes.Bottom.AxisPen.Visible = false; 
     this.Chart.Axes.Bottom.Grid.Visible = false; 
     this.Chart.Axes.Bottom.Ticks.Visible = false; 
     this.Chart.Axes.Bottom.MinorTicks.Visible = false; 
     this.Chart.Axes.Bottom.MinorGrid.Visible = false; 
     this.Chart.Axes.Bottom.Grid.Visible = false; 
     this.Chart.Axes.Bottom.Labels.Angle = 90; 
     this.Chart.Axes.Bottom.Labels.Font.Color = textColor; 

     // series 
     Steema.TeeChart.Styles.Bar testSeries = new Steema.TeeChart.Styles.Bar() { VertAxis = Steema.TeeChart.Styles.VerticalAxis.Left }; 
     testSeries.Marks.Visible = false; 
     testSeries.Color = UIColor.Blue.CGColor; 
     testSeries.XValues.DateTime = true; 
     testSeries.BarWidthPercent = 100 * (int) (float)UIKit.UIScreen.MainScreen.Scale; 
     testSeries.SideMargins = true; 
     this.Chart.Series.Add(testSeries); 
    } 

结果是这样的:

chart

正如你所看到的,中轴下方的标签被切断。我正在使用最新的TeeChart版本(4.15.1.19)。

任何帮助,将不胜感激。

回答

1

是的,你是正确的,这是一个已经修复的错误。它将包含在下一个维护版本中,该版本将在Xamarin商店以及我们的网站上的客户下载页面上提供。

谢谢!

Josep

+0

谢谢。你有预计发布日期吗?我们尽快需要此修复程序... – vbm

+0

@vbm我们预计它会在本周内发布。 –

+0

@NarcísCalvet我下载了最新版本,但我仍然看到相同的问题... – vbm