VB:mschart画条形图X轴显示数据问题 我想把msflexgrid中2列N>1000行数据用mschart画条形图,要求:第一列作为x轴,第二列作为y轴,也就是对应的1,2列分别为(x,y)坐标,并把x,y轴分别显示数据,而不是x轴显示C1,c2,,,,,,这一点非常难做,请高手帮吗?我就是想把X数据下面显示数据! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 If MSFlexGridData.Rows = 2 Then MsgBox "未输入数据,无剖面特征可显示!", vbOKOnly, "提示"Else DiaCSD.Visible = FalseOn Error Resume Next With DiaCSD.MSChart1 .AllowDithering = True .AllowDynamicRotation = True .AllowSelections = True .AllowSeriesSelection = True .AutoIncrement = True .ShowLegend = True' .Plot.Axis(VtChAxisIdY).ValueScale.Auto = False' .Plot.Axis(VtChAxisIdY2).ValueScale.Auto = False' .Plot.Axis(VtChAxisIdY).ValueScale.Minimum = 0' .Plot.Axis(VtChAxisIdY).ValueScale.Maximum = 5' .Plot.Axis(VtChAxisIdY2).ValueScale.Minimum = 0' .Plot.Axis(VtChAxisIdY2).ValueScale.Maximum = 5 .Plot.Axis(VtChAxisIdX).ValueScale.MajorDivision = 5 'X轴主要网格数量 .Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision = 5 'Y轴主要网格数量 .Plot.Axis(VtChAxisIdX).ValueScale.MinorDivision = 0 'X轴次要网格数量 .Plot.Axis(VtChAxisIdY).ValueScale.MinorDivision = 0 'Y轴次要网格数量 .Plot.Axis(VtChAxisIdX).AxisGrid.MajorPen.Style = VtPenStyleDotted .Plot.Axis(VtChAxisIdY).AxisGrid.MajorPen.Style = VtPenStyleDotted .Plot.AutoLayout = False .Plot.UniformAxis = False .ChartType = VtChChartType2dBar 'VtChChartType2dXY '设置图形为二维散点图 .TitleText = "水平井吸汽剖面解释" .Plot.Axis(VtChAxisIdX, 0).AxisTitle = "测 深 (m)" .Plot.Axis(VtChAxisIdY, 0).AxisTitle = "吸汽百分数" .Legend.Location.LocationType = VtChLocationTypeBottomRight End With With MSFlexGridData ReDim MyData(1 To .Rows - 1, 0 To 1) Dim i As Integer For i = 1 To .Rows - 1 MyData(i, 0) = Str(MSFlexGridData.TextMatrix(i, 0)) MyData(i, 1) = Val(MSFlexGridData.TextMatrix(i, 1)) Next i End With DiaCSD.MSChart1.ChartData = MyData DiaCSD.MSChart1.Plot.SeriesCollection(1).LegendText = "吸汽百分数" DiaCSD.Show End If N>1000行,就算横1000,竖1000,再说小些横100,竖100都难画开. xmlhttp vb如何post这个登陆页面 窗体中显示图片如何添加上下、左右滑动块? VB: 如何在模式窗口下对另外的窗口的控件属性进行更改? 我是菜鸟,向高手请教一个问题 如何分页数据库的检索结果 往控件容器中添加文件(在线等……)请各位哥哥姐姐,抽空帮忙看看 新手求助,vb远程访问数据库问题 怎么才能使form不能移动到屏幕外面? 请教高手关于扫描空间的奇怪问题。 难道不要money的你们才看吗?一方面想要money,又不肯出学费,中国人的本性! VB中如何用划动条改变字体的大小?急求 求 代码 VB做Ole文档服务器的问题
MsgBox "未输入数据,无剖面特征可显示!", vbOKOnly, "提示"
Else
DiaCSD.Visible = False
On Error Resume Next
With DiaCSD.MSChart1
.AllowDithering = True
.AllowDynamicRotation = True
.AllowSelections = True
.AllowSeriesSelection = True
.AutoIncrement = True
.ShowLegend = True
' .Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
' .Plot.Axis(VtChAxisIdY2).ValueScale.Auto = False
' .Plot.Axis(VtChAxisIdY).ValueScale.Minimum = 0
' .Plot.Axis(VtChAxisIdY).ValueScale.Maximum = 5
' .Plot.Axis(VtChAxisIdY2).ValueScale.Minimum = 0
' .Plot.Axis(VtChAxisIdY2).ValueScale.Maximum = 5
.Plot.Axis(VtChAxisIdX).ValueScale.MajorDivision = 5 'X轴主要网格数量
.Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision = 5 'Y轴主要网格数量
.Plot.Axis(VtChAxisIdX).ValueScale.MinorDivision = 0 'X轴次要网格数量
.Plot.Axis(VtChAxisIdY).ValueScale.MinorDivision = 0 'Y轴次要网格数量
.Plot.Axis(VtChAxisIdX).AxisGrid.MajorPen.Style = VtPenStyleDotted
.Plot.Axis(VtChAxisIdY).AxisGrid.MajorPen.Style = VtPenStyleDotted
.Plot.AutoLayout = False
.Plot.UniformAxis = False
.ChartType = VtChChartType2dBar 'VtChChartType2dXY '设置图形为二维散点图
.TitleText = "水平井吸汽剖面解释"
.Plot.Axis(VtChAxisIdX, 0).AxisTitle = "测 深 (m)"
.Plot.Axis(VtChAxisIdY, 0).AxisTitle = "吸汽百分数"
.Legend.Location.LocationType = VtChLocationTypeBottomRight
End With
With MSFlexGridData
ReDim MyData(1 To .Rows - 1, 0 To 1)
Dim i As Integer
For i = 1 To .Rows - 1
MyData(i, 0) = Str(MSFlexGridData.TextMatrix(i, 0))
MyData(i, 1) = Val(MSFlexGridData.TextMatrix(i, 1))
Next i
End With
DiaCSD.MSChart1.ChartData = MyData
DiaCSD.MSChart1.Plot.SeriesCollection(1).LegendText = "吸汽百分数"
DiaCSD.Show
End If