请问如何在柱状图顶端将数值一同显示出来?

mr_zero 2004-08-09 08:59:26
使用mschart控件显示二维柱状图,请问如何在柱状图顶端将数值一同显示出来?
...全文
506 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
mr_zero 2004-08-11
  • 打赏
  • 举报
回复
多谢!
haode 2004-08-10
  • 打赏
  • 举报
回复
MSCHART有这个属性的。你试试改属性吧。很容易就试出来了……

我这里没有VB,具体属性名我忘了。
啊维 2004-08-10
  • 打赏
  • 举报
回复
用teechart图形控件吧,这个很容易做到
sangshuyezi 2004-08-10
  • 打赏
  • 举报
回复
With MSChart1
.Backdrop.Fill.Style = VtFillStyleBrush
.ColumnCount = 1
.RowCount = UBound(Y, 1) + 1
.Row = 1
For I = 1 To .RowCount
.Row = I
.RowLabel = Format(Y(I - 1, 0), "mm/dd/yy")
Next I
.Backdrop.Fill.Style = VtFillStyleBrush
.Column = 1
.Plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeOutside
.Plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.ValueFormat = "#0.00"
.Plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.Custom = True
.Plot.SubPlotLabelPosition = VtChSubPlotLabelLocationTypeAbove
For I = 1 To .RowCount
.Row = I
.Data = Y(I - 1, 1)
Call .Plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.ResetCustomLabel
Next I
End With

在数组Y是一个二维数组(日期,数据)
你可以用你自己的的数组代替。
.Plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeOutside这句是用来显示数据点标签的。

1,453

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧