2015-05-24 74 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