VB6.0里MSChart 控件 画两条线,MSChart 2.Column = 1绑定是Y左边 ,MSChart 2.Column = 1绑定的是Y轴
是现在左边的线可以跟着Y轴绑定了右边的线还是没反应请问这是怎么回事,请专家给看看,重谢,代码如下:(VB6.0)MSChart2.TitleText="Sillicone...
是现在左边的线可以跟着Y轴绑定了 右边的线还是没反应 请问这是怎么回事,请专家给看看,重谢,代码如下:(VB6.0)
MSChart2.TitleText = "Sillicone 使用量"
RowCount = res.RecordCount
RowI = RowCount
If res.RecordCount = 0 Then Exit Sub
ReDim ss(res.RecordCount)
With MSChart2
.RowCount = RowCount 'rs.RecordCount
.chartType = VtChChartType2dLine
.ColumnCount = 2
For i = 1 To .Plot.SeriesCollection.Count
.Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint
Next
.Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
.Plot.Axis(VtChAxisIdY2).ValueScale.Auto = False
If res.RecordCount > 0 Then
res.MoveFirst
Else
Exit Sub
End If
MSChart2.chartType = VtChChartType2dCombination
MSChart2.Plot.SeriesCollection.Item(1).SeriesType = VtChSeriesType2dLine
MSChart2.Plot.SeriesCollection.Item(2).SeriesType = VtChSeriesType2dBar
For i = 0 To res.RecordCount - 1
.Column = 1 '收入曲线所在列
.RowCount = res.RecordCount
.Row = i + 1
.RowLabel = CStr(res("date"))
.Plot.Axis(VtChAxisIdY).ValueScale.Maximum = res1.Fields("good_qty1").Value
.Plot.Axis(VtChAxisIdY).ValueScale.Minimum = res1.Fields("good_qty2").Value
.Data = CDec(res("good_qty"))
.ColumnLabel = "生产量" '图例说明文字
'//兼职收入显示
.Column = 2 '兼职收入曲线所在列
.Plot.Axis(VtChAxisIdY2).ValueScale.Maximum = res1.Fields("jldw1").Value
.Plot.Axis(VtChAxisIdY2).ValueScale.Minimum = res1.Fields("jldw2").Value
.Data = res("jldw")
.ColumnLabel = "计量单位" '图例说明文字
res.MoveNext
Next
If res1.State = adStateOpen Then res1.Close
Set res1 = Nothing
拜托了 在线等 急。。。。。。。。。。 展开
MSChart2.TitleText = "Sillicone 使用量"
RowCount = res.RecordCount
RowI = RowCount
If res.RecordCount = 0 Then Exit Sub
ReDim ss(res.RecordCount)
With MSChart2
.RowCount = RowCount 'rs.RecordCount
.chartType = VtChChartType2dLine
.ColumnCount = 2
For i = 1 To .Plot.SeriesCollection.Count
.Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint
Next
.Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
.Plot.Axis(VtChAxisIdY2).ValueScale.Auto = False
If res.RecordCount > 0 Then
res.MoveFirst
Else
Exit Sub
End If
MSChart2.chartType = VtChChartType2dCombination
MSChart2.Plot.SeriesCollection.Item(1).SeriesType = VtChSeriesType2dLine
MSChart2.Plot.SeriesCollection.Item(2).SeriesType = VtChSeriesType2dBar
For i = 0 To res.RecordCount - 1
.Column = 1 '收入曲线所在列
.RowCount = res.RecordCount
.Row = i + 1
.RowLabel = CStr(res("date"))
.Plot.Axis(VtChAxisIdY).ValueScale.Maximum = res1.Fields("good_qty1").Value
.Plot.Axis(VtChAxisIdY).ValueScale.Minimum = res1.Fields("good_qty2").Value
.Data = CDec(res("good_qty"))
.ColumnLabel = "生产量" '图例说明文字
'//兼职收入显示
.Column = 2 '兼职收入曲线所在列
.Plot.Axis(VtChAxisIdY2).ValueScale.Maximum = res1.Fields("jldw1").Value
.Plot.Axis(VtChAxisIdY2).ValueScale.Minimum = res1.Fields("jldw2").Value
.Data = res("jldw")
.ColumnLabel = "计量单位" '图例说明文字
res.MoveNext
Next
If res1.State = adStateOpen Then res1.Close
Set res1 = Nothing
拜托了 在线等 急。。。。。。。。。。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询