首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Teechart Extra Legend工具

Teechart Extra Legend工具
EN

Stack Overflow用户
提问于 2013-09-30 17:33:59
回答 1查看 305关注 0票数 0

我想要在图表区域中显示平均值、中位数和标准差,以防使用附加图例工具时无法示教方框Plot.Since自定义图例工具。

问题是,在我的底部Axis.Can之后,我无法将额外的图例放置在空白区域中,有人会帮助我吗?

EN

回答 1

Stack Overflow用户

发布于 2013-10-01 18:01:29

我认为您的问题产生是因为您需要重新绘制图表,然后再尝试使用ExtraLegend工具计算自定义位置。你可以做一些类似于我在下面的简单代码中所做的事情,其中我已经绘制了一个ExtraLegend工具align to original Legend:

代码语言:javascript
复制
Private Sub Form_Load()
  TChart1.AddSeries scBox
  TChart1.AddSeries scBox
  TChart1.Series(0).FillSampleValues 5
  TChart1.Series(1).FillSampleValues 5
  TChart1.Legend.LegendStyle = lsValues
  TChart1.Series(0).asBoxPlot.Box.Brush.Color = vbRed
  TChart1.Series(1).asBoxPlot.Box.Brush.Color = vbBlue
  TChart1.Tools.Add tcExtraLegend
  TChart1.Tools.Items(0).asExtraLegend.Series = TChart1.Series(1)
  'Use internal Repaint to calculate the position of Legend.
 TChart1.Environment.InternalRepaint
   With TChart1.Tools.Items(0).asExtraLegend.Legend
    .CustomPosition = True
    .Left = TChart1.Legend.Left
    .Top = TChart1.Legend.ShapeBounds.Bottom + 10
  End With
End Sub

你能告诉我们我的建议代码是否能帮助你解决问题吗?

我希望威尔能帮上忙。

谢谢,

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19090887

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档