Xamarin.ios 使用Monotouch上的Teechart无法正确显示2D图表

Xamarin.ios 使用Monotouch上的Teechart无法正确显示2D图表,xamarin.ios,teechart,Xamarin.ios,Teechart,为iOS版的.NET Monotouch评估Teechart很有趣。遇到了几个无法解决的问题。基本上,我试图呈现一个二维条形图,其中包含两个或三个系列,最多包含24个数据点 这是我的测试代码 chart3.Aspect.View3D = false; chart3.Legend.Visible = false; chart3.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollSt

为iOS版的.NET Monotouch评估Teechart很有趣。遇到了几个无法解决的问题。基本上,我试图呈现一个二维条形图,其中包含两个或三个系列,最多包含24个数据点

这是我的测试代码

    chart3.Aspect.View3D = false;
    chart3.Legend.Visible = false;
    chart3.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Auto;   

    Axis left=chart3.Axes.Left;
    left.Grid.Visible = false; 
    left.Automatic=false;
    left.Minimum=0;
    left.Maximum=20;
    left.Increment=1;

    Axis bottom=chart3.Axes.Bottom;
    bottom.Visible=true;
    bottom.Grid.Visible = false; 

    Steema.TeeChart.Styles.Bar bar1=new Steema.TeeChart.Styles.Bar();
    chart3.Series.Add(bar1);
    bar1.Add(12.0,"Jun 2012");  
    bar1.Add(8.0,"Jul 2012"); 
    bar1.Add(0.5,"Aug 2012"); 
    bar1.Add(6.7,"Sep 2012"); 
    bar1.Pen.Width = 0;
    bar1.Gradient.Visible = true;
    bar1.GetSeriesMark += (series, e) => {object v=series.YValues[e.ValueIndex];   e.MarkText=""+v;};

    Steema.TeeChart.Styles.Bar bar2=new Steema.TeeChart.Styles.Bar();
    chart3.Series.Add(bar2);
    bar2.Add(8.0,"Jun 2012"); 
    bar2.Add(5.0,"Jul 2012"); 
    bar2.Add(5.0,"Aug 2012"); 
    bar2.Add(14.0,"Sep 2012"); 
    bar2.Pen.Width = 0;
    bar2.Gradient.Visible = true;
    bar2.GetSeriesMark += (series, e) => {object v=series.YValues[e.ValueIndex];   e.MarkText=""+v;};
上面的代码创建了两个具有四个点的二维条形样式系列

这是我得到的结果 主要的问题是,所有条都在零上浮动0.5点(注意左轴上的8.5,其中值为8)。向上滚动显示这一点 我面临的第二个问题是,库没有考虑为最后一个轴设置的最大值。 如果我将Aspect.View3D设置为true,则图表看起来会更好 3D有它自己的一套问题,但我们还是需要2D


我的问题是:我做错了什么?

是的,你是对的。我可以在这里重现这个问题。 下一个即将发布的维护版本中将包含一个修复程序。 同时,一种解决方法是设置为手动ZoomScroll样式,这使得使用TeeChart库的默认缩放和滚动: 代码:


是的,你说得对。我可以在这里重现这个问题。 下一个即将发布的维护版本中将包含一个修复程序。 同时,一种解决方法是设置为手动ZoomScroll样式,这使得使用TeeChart库的默认缩放和滚动: 代码:

_controller.chart.Chart.Aspect.ZoomScrollStyle = Steema.TeeChart.Drawing.Aspect.ZoomScrollStyles.Manual