【问题标题】:Teechart C#:How to find shapeindex of country in different regions?Teechart C#:如何查找不同地区国家的shapeindex?
【发布时间】:2017-06-12 06:02:37
【问题描述】:

如何查找不同地区国家的形状指数。 .net 的 Techart

【问题讨论】:

  • 到目前为止你做了什么?

标签: c#-4.0 teechart


【解决方案1】:

如果这不是您所要求的,请扩展问题。

知道一个国家的名字,你可以循环Labels数组来找到那个形状的索引。即:

private void CreateMap()
{
  World world1 = new World(tChart1.Chart);
  world1.FillSampleValues();

  for (int i = 0; i < world1.Count; i++)
  {
    if (world1.Labels[i] == "Spain")
    {
      world1.Colors[i] = Color.Red;
      break;
    }
  }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-06-24
    • 1970-01-01
    • 2013-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-12
    相关资源
    最近更新 更多