![]() |
|
||||||||||||||
| | 网站首页 | 数据库教程 | web编程 | 服务器 | 程序设计 | | ||
|
||
|
||||||
| MSChar显示百分比 | ||||||
作者:佚名 文章来源:不详 点击数: 更新时间:2007-8-11 ![]() |
||||||
|
问: 画饼图所需要的数据都在数组里面: MSChart.chartType = VtChChartType2dPie ' 画饼图 MSChart.Visible = True MSChart.AllowSelections = False MSChart.ShowLegend = True MSChart.TitleText = "百分比图" ' 为Chart控件的各行各列赋值 MSChart.RowCount = 1 MSChart.ColumnCount = iMax + 1 MSChart.RowLabel = "" For i = 0 To iMax MSChart.Row = 1 MSChart.Column = i + 1 MSChart.Data = dataArray(i, 1) MSChart.ColumnLabel = dataArray(i, 0) Next
如何显示百分比呢? 答: Private Sub Form_Load() With MSChart1 .ChartType = VtChChartType2dPie For i = 1 To 3 .Row = 1 .Column = i .Data = i * 100 Next With .DataGrid .RowLabelCount = 1 .ColumnCount = 3 .RowCount = 1 For i = 1 To .ColumnCount .ColumnLabel(i, 1) = "Column " & i Next i .RowLabel(1, 1) = "Data as a Percentage" End With For i = 1 To .Plot.SeriesCollection.Count With .Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel .LocationType = VtChLabelLocationTypeOutside .Component = VtChLabelComponentPercent .PercentFormat = "0%" .VtFont.Size = 10 End With Next i End With End Sub 本文来源:http://blog.csdn.net/cncco/archive/2007/08/07/1729589.aspx
|
||||||
| 文章录入:admin 责任编辑:admin | ||||||
| 【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 | ||||||
| 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
| | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 网站公告 | 网站地图 | 管理登录 | | |||
|