Teechart Mobile - Column3D堆叠图

Teechart Mobile - Column3DStacked graph

我想创建一个类似于下图的图表:

但是我在 TeeChart 中找不到任何会产生类似结果的东西。 我试图创建一个 Bar3D 系列并将其 MultiBar 属性 设置为不同的值,但我发现最接近的值是 MultiBars.None.

有什么建议吗?

是的,这可以通过将 MultiBar 属性 设置为 Stacked 的标准 Bar 系列来实现,例如:

  Steema.TeeChart.Themes.ExcelTheme excelTheme = new Steema.TeeChart.Themes.ExcelTheme(tChart1.Chart);
  excelTheme.Apply();

  tChart1.Aspect.View3D = true;
  tChart1.Axes.Bottom.Grid.Visible = false;

  tChart1.Legend.Pen.Visible = false;

  Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
  bar1.Marks.Visible = false;
  bar1.MultiBar = Steema.TeeChart.Styles.MultiBars.Stacked;
  bar1.BarWidthPercent = 50;
  bar1.Title = "Net personally receivable";

  Steema.TeeChart.Styles.Bar bar2 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
  bar2.Marks.Visible = false;
  bar2.MultiBar = Steema.TeeChart.Styles.MultiBars.Stacked;
  bar2.BarWidthPercent = 50;
  bar2.Title = "Tax and costs";

  Random rnd = new Random();

  bar1.Add(rnd.Next(), "Do Nothing");
  bar1.Add(rnd.Next(), "Bonus");
  bar1.Add(rnd.Next(), "Dividend");
  bar1.Add(rnd.Next(), "Interest");
  bar1.Add(rnd.Next(), "Alpha Index\nTrades");

  bar2.Add(rnd.Next(), "Do Nothing");
  bar2.Add(rnd.Next(), "Bonus");
  bar2.Add(rnd.Next(), "Dividend");
  bar2.Add(rnd.Next(), "Interest");
  bar2.Add(rnd.Next(), "Alpha Index\nTrades");

生成此图表: