无法改变MSChart标识图表中数据点的标记的样式和大小
编号:QA002088
建立日期: 1999年11月24日 最后修改日期:1999年11月24日
所属类别:
Chen, Qing:
操作系统: windows 95
编程工具: vb6.0
问题: I got the following code from vb6 help file:
Private Sub Command1_Click()
' Display Markers for Series 1.
With Mschart1.Plot.SeriesCollection _
.Item(1).DataPoints.Item(-1).Marker
.Visible = True
.Size = 20
.Style = VtMarkerStyleX
.FillColor.Automatic = False
.FillColor.Set 0, 0, 255
End With
End Sub
I put a mschart control and a button on a form, and copied the above code into button click event.
Then,changed
".Style=VtMarkerStyleX"
to
".Style=VtMarkerStyleFilledCircle"
The Mschart type was set to XY(scatter)
When I run the form, after I click the button, what happened was the serise markers always appeared like '+',not the filled circles it supposed to be. I really could not figure out what problem it was.
I'm wondering if you can get a way to change marker's shape style.
回答:
如果要改变系列的标记类型,则应将SeriesMarker 对象的Auto属性设为 False,默认为True。
你需要在执行这段代码前执行:
MSChart1.Plot.SeriesCollection _
.Item(1).SeriesMarker.Auto = False
另外,在帮助中说Size属性是以磅为单位的,但实际上好象是以Twips为单位的,你必须将.Size改为200才能看见标志。
此问题由李海回答。
| |
|
|
| |
|
|