【问题标题】:Moving labels off the pie chart将标签移出饼图
【发布时间】:2012-07-11 13:34:36
【问题描述】:

我正在尝试使用 VS2010(mvc、ef 和 asp.net)中的固定图表控件将饼图的标签关闭

这是我显示饼图的代码。

  string xx = activePhysicianID;
  ArrayList xValue = new ArrayList();
  ArrayList yValue = new ArrayList();
  XXXXX_MainEntities dbContext = new XXXXX_MainEntities();
  var results = dbContext.Payor.Where(rs => rs.PhysicianIdentity.Equals(xx));

  results.ToList().ForEach(rs => xValue.Add(rs.Identifier));
  results.ToList().ForEach(rs => yValue.Add(rs.Strength));

  var chart = new Chart(600, 300, ChartTheme.Blue);

  chart.AddSeries(chartType: "Pie", xValue: xValue, yValues: yValue);
  chart.AddTitle("Payor");
  chart.Write("png");

  return null;

饼图渲染OK,但是饼图上的标签,太难看。我想用指向线段的线来标记图表之外的标签。

谢谢

【问题讨论】:

标签: c# asp.net-mvc mschart


【解决方案1】:

试试这个:

chart.Series["Pie"]["PieLabelStyle"] = "Outside";

【讨论】:

    猜你喜欢
    • 2013-07-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-08
    • 2017-12-01
    • 2020-02-06
    相关资源
    最近更新 更多