Xamarin.android TeeChart单机器人版本

Xamarin.android TeeChart单机器人版本,xamarin.android,teechart,Xamarin.android,Teechart,我刚刚开始评估TeeChart MonoDroid版本,以下代码中存在一些小问题: TChart _Chart = new TChart(context); Bar _Bar1 = new Bar(_Chart.Chart); Bar _Bar2 = new Bar(_Chart.Chart); _Chart.Axes.Left.Increment = 25; _Chart.Axes.Left.SetMinMax(0, 100); _Chart.Axes.Left.Labels.Style =

我刚刚开始评估TeeChart MonoDroid版本,以下代码中存在一些小问题:

TChart _Chart = new TChart(context);
Bar _Bar1 = new Bar(_Chart.Chart);
Bar _Bar2 = new Bar(_Chart.Chart);

_Chart.Axes.Left.Increment = 25;
_Chart.Axes.Left.SetMinMax(0, 100);
_Chart.Axes.Left.Labels.Style = AxisLabelStyle.Mark;
_Chart.Axes.Visible = false;
_Chart.Walls.Left.Visible = false;
_Chart.Panel.Gradient.Visible = false;
_Chart.Panel.Transparent = true;
_Chart.Walls.Back.Color = System.Drawing.Color.White;
_Chart.Walls.Back.Width = 200;
_Chart.Walls.Back.Transparency = 90;
_Chart.Walls.Back.Gradient.Visible = false;
_Chart.Walls.Bottom.Size = 10;
_Chart.Walls.Bottom.Width = 200;
_Chart.Legend.Visible = false;
_Chart.Header.Visible = false;
_Chart.Aspect.View3D = true;
_Chart.SetBackgroundColor(Color.Transparent);

_Bar1.Add(50, "50%");
_Bar1.Depth = 10;
_Bar1.Pen.Color = System.Drawing.Color.Red;
_Bar1.Color = System.Drawing.Color.Red;
_Bar1.MarksOnBar = true;
_Bar1.MultiBar = MultiBars.Stacked;
_Bar1.Marks.Style = MarksStyles.Label;
_Bar1.Marks.Transparent = true;
_Bar1.Marks.Font.Color = System.Drawing.Color.White;
_Bar1.Marks.Font.Size = 18;
_Bar1.Marks.Font.Bold = true;
_Bar1.CustomBarWidth = 75;
_Bar1.MarksLocation = MarksLocation.Center;

_Chart.Series.Add(_Bar1);

_Bar2.Add(50, "50%");
_Bar2.Depth = 10;
_Bar2.Pen.Color = System.Drawing.Color.Black;
_Bar2.Color = System.Drawing.Color.Black;
_Bar2.MarksOnBar = true;
_Bar2.MultiBar = MultiBars.Stacked;
_Bar2.Marks.Style = MarksStyles.Label;
_Bar2.Marks.Transparent = true;
_Bar2.Marks.Font.Color = System.Drawing.Color.White;
_Bar2.Marks.Font.Size = 18;
_Bar2.Marks.Font.Bold = true;
_Bar2.CustomBarWidth = 75;
_Bar2.MarksLocation = MarksLocation.Center;

_Chart.Series.Add(_Bar2);

AbsoluteLayout absl = new AbsoluteLayout(this);

absl.SetBackgroundColor(Color.Transparent);

absl.AddView(_Chart, new AbsoluteLayout.LayoutParams(400, 1200, 0, 0));
_Chart.Series[0].Clear();
_Chart.Series[1].Clear();

_Bar1.Add(HistoryRed, String.Format("{0:0,0.00}%", HistoryRed));
_Bar1.Depth = 10;
_Bar1.Pen.Color = System.Drawing.Color.Red;
_Bar1.Color = System.Drawing.Color.Red;
_Bar1.MarksOnBar = true;
_Bar1.MultiBar = MultiBars.Stacked;
_Bar1.Marks.Style = MarksStyles.Label;
_Bar1.Marks.Transparent = true;
_Bar1.Marks.Font.Color = System.Drawing.Color.White;
_Bar1.Marks.Font.Size = 18;
_Bar1.Marks.Font.Bold = true;
_Bar1.CustomBarWidth = 75;
_Bar1.MarksLocation = MarksLocation.Center;

_Chart.Series[0].Add(_Bar1);

_Bar2.Add(HistoryBlack, String.Format("{0:0,0.00}%", HistoryBlack));        
_Bar2.Depth = 10;
_Bar2.Pen.Color = System.Drawing.Color.Black;
_Bar2.Color = System.Drawing.Color.Black;
_Bar2.MarksOnBar = true;
_Bar2.MultiBar = MultiBars.Stacked;
_Bar2.Marks.Style = MarksStyles.Label;
_Bar2.Marks.Transparent = true;
_Bar2.Marks.Font.Color = System.Drawing.Color.White;
_Bar2.Marks.Font.Size = 18;
_Bar2.Marks.Font.Bold = true;
_Bar2.CustomBarWidth = 75;
_Bar2.MarksLocation = MarksLocation.Center;

_Chart.Series[1].Add(_Bar2);
这将产生一个堆叠的单条,50%分为红色和黑色。我的问题如下:

1) 无论我尝试什么,我都无法使视图透明-我希望任何底层视图都能通过图表显示出来

2) 我似乎无法使底部的“墙”更深——我希望它和酒吧的深度一样深

当我尝试使用以下代码更新图表时,我也遇到“闪烁”问题:

TChart _Chart = new TChart(context);
Bar _Bar1 = new Bar(_Chart.Chart);
Bar _Bar2 = new Bar(_Chart.Chart);

_Chart.Axes.Left.Increment = 25;
_Chart.Axes.Left.SetMinMax(0, 100);
_Chart.Axes.Left.Labels.Style = AxisLabelStyle.Mark;
_Chart.Axes.Visible = false;
_Chart.Walls.Left.Visible = false;
_Chart.Panel.Gradient.Visible = false;
_Chart.Panel.Transparent = true;
_Chart.Walls.Back.Color = System.Drawing.Color.White;
_Chart.Walls.Back.Width = 200;
_Chart.Walls.Back.Transparency = 90;
_Chart.Walls.Back.Gradient.Visible = false;
_Chart.Walls.Bottom.Size = 10;
_Chart.Walls.Bottom.Width = 200;
_Chart.Legend.Visible = false;
_Chart.Header.Visible = false;
_Chart.Aspect.View3D = true;
_Chart.SetBackgroundColor(Color.Transparent);

_Bar1.Add(50, "50%");
_Bar1.Depth = 10;
_Bar1.Pen.Color = System.Drawing.Color.Red;
_Bar1.Color = System.Drawing.Color.Red;
_Bar1.MarksOnBar = true;
_Bar1.MultiBar = MultiBars.Stacked;
_Bar1.Marks.Style = MarksStyles.Label;
_Bar1.Marks.Transparent = true;
_Bar1.Marks.Font.Color = System.Drawing.Color.White;
_Bar1.Marks.Font.Size = 18;
_Bar1.Marks.Font.Bold = true;
_Bar1.CustomBarWidth = 75;
_Bar1.MarksLocation = MarksLocation.Center;

_Chart.Series.Add(_Bar1);

_Bar2.Add(50, "50%");
_Bar2.Depth = 10;
_Bar2.Pen.Color = System.Drawing.Color.Black;
_Bar2.Color = System.Drawing.Color.Black;
_Bar2.MarksOnBar = true;
_Bar2.MultiBar = MultiBars.Stacked;
_Bar2.Marks.Style = MarksStyles.Label;
_Bar2.Marks.Transparent = true;
_Bar2.Marks.Font.Color = System.Drawing.Color.White;
_Bar2.Marks.Font.Size = 18;
_Bar2.Marks.Font.Bold = true;
_Bar2.CustomBarWidth = 75;
_Bar2.MarksLocation = MarksLocation.Center;

_Chart.Series.Add(_Bar2);

AbsoluteLayout absl = new AbsoluteLayout(this);

absl.SetBackgroundColor(Color.Transparent);

absl.AddView(_Chart, new AbsoluteLayout.LayoutParams(400, 1200, 0, 0));
_Chart.Series[0].Clear();
_Chart.Series[1].Clear();

_Bar1.Add(HistoryRed, String.Format("{0:0,0.00}%", HistoryRed));
_Bar1.Depth = 10;
_Bar1.Pen.Color = System.Drawing.Color.Red;
_Bar1.Color = System.Drawing.Color.Red;
_Bar1.MarksOnBar = true;
_Bar1.MultiBar = MultiBars.Stacked;
_Bar1.Marks.Style = MarksStyles.Label;
_Bar1.Marks.Transparent = true;
_Bar1.Marks.Font.Color = System.Drawing.Color.White;
_Bar1.Marks.Font.Size = 18;
_Bar1.Marks.Font.Bold = true;
_Bar1.CustomBarWidth = 75;
_Bar1.MarksLocation = MarksLocation.Center;

_Chart.Series[0].Add(_Bar1);

_Bar2.Add(HistoryBlack, String.Format("{0:0,0.00}%", HistoryBlack));        
_Bar2.Depth = 10;
_Bar2.Pen.Color = System.Drawing.Color.Black;
_Bar2.Color = System.Drawing.Color.Black;
_Bar2.MarksOnBar = true;
_Bar2.MultiBar = MultiBars.Stacked;
_Bar2.Marks.Style = MarksStyles.Label;
_Bar2.Marks.Transparent = true;
_Bar2.Marks.Font.Color = System.Drawing.Color.White;
_Bar2.Marks.Font.Size = 18;
_Bar2.Marks.Font.Bold = true;
_Bar2.CustomBarWidth = 75;
_Bar2.MarksLocation = MarksLocation.Center;

_Chart.Series[1].Add(_Bar2);
整个视图似乎被破坏和重新创建,当它消失和重新出现时,会发出短暂的闪光。有没有办法在不闪烁的情况下更新图表

1) 不管我怎么做,我都不能让视图透明——我会的 与通过图表显示的任何基础视图一样

您还需要将“后墙”设置为“透明”:

  _Chart.Walls.Back.Transparent = true;
2) 我似乎无法将底部的“墙”再深一点——我希望如此 深度与钢筋深度相同

您可以使用Chart3DPercent进行更改:

整个视图似乎被破坏并重新创建,这给了 消失和重新出现时的短暂闪光。有办法去吗 是否在不闪烁的情况下更新图表

最近,我们为MfA实现了一项新功能,该功能同时禁用缩放和滚动:

  _Chart.Zoom.Style = Steema.TeeChart.ZoomStyles.None;

由于不支持缩放或滚动,图表可以以更有效的方式呈现。TeeChart Mono for Androis安装程序包含一个实时图表演示。

好的,我尝试了新版本并使用ZoomStyles。没有一个会导致MonoDroid崩溃。此外,使用repaint=false/repaint=true和Invalidate()技术根本不会更新图表。我修改了你的实时图表样本以重现行为,并将其上传到Steema上传页面(称为ZoomStyleCrasHandRepainFailure.zip)@user1737571我无法使用你的项目重现问题。我应该执行任何特定的操作来复制它吗?您使用的是哪种单机器人版本?我不确定这个测试版本是用4.2.4还是4.2.5构建的。此外,您可能还想尝试另一个版本:www.steema.us/files/public/realtimeechartmfadoublebuffering.zip,它使用MfA 4.2.6。您好,我一直认为这与启用旧TeeChart.MonoDroid.dll的设备有关。如果我部署到一个以前没有TeeChart项目的其他设备上,它看起来工作正常吗?MonoDroid构建脚本似乎出于某种原因没有更新dll,即使我在VS@user1737571中进行了清理/重建,作为更新,实现上述功能的维护版本刚刚发布: