|
2009年注册的,忘记密码了,又重新注册了。不知道能否找回密码。2010年就该是学习Microsoft Graph,13年了还没有学习好,再次下功夫学习图表。
VBA图表基础教程-Excel VBA程序开发-ExcelHome技术论坛 - https://club.excelhome.net/forum.php?mod=viewthread&tid=1417686
- With ch.Chart
- With .SeriesCollection.NewSeries
- .Values = ws.Range("b3:b" & lastrow)
- .XValues = ws.Range("a3:a" & lastrow)
- .ChartType = xlArea
- .Interior.Color = RGB(127, 255, 212)
- End With
- With .SeriesCollection.NewSeries
- .Values = ws.Range("b3:b" & lastrow)
- .XValues = ws.Range("a3:a" & lastrow)
- .ChartType = xlLineMarkers
- .MarkerSize = 5 '数据标记大小
- .MarkerStyle = xlMarkerStyleCircle '数据标记类型
- .MarkerBackgroundColor = RGB(255, 106, 106)
- .MarkerForegroundColor = RGB(90, 178, 238)
- .HasDataLabels = True '有数据标签
- .DataLabels.NumberFormat = "0.00"
- .HasLeaderLines = True
- .LeaderLines.Border.ColorIndex = 5
- .Trendlines.Add Type:=xlPolynomial '趋势线
- .Trendlines(1).Border.LineStyle = xlDash
- .Trendlines(1).Border.Color = vbRed
- End With
- .HasLegend = False
- End With
- 再好好学习这个贴子。
复制代码
- With ch.Chart.Axes(xlValue, xlPrimary)
- .CrossesAt = .MinimumScale
- .TickLabels.Font.Size = 8
- .MajorGridlines.Border.ColorIndex = 20
- .HasTitle = True
- .AxisTitle.Text = "市盈率"
- .AxisTitle.Orientation = xlVertical
- End With
- With ch.Chart.Axes(xlValue, xlSecondary)
- .CrossesAt = .MinimumScale
- .TickLabels.Font.Size = 8
- .HasTitle = True
- .AxisTitle.Text = "市净率"
- .AxisTitle.Orientation = xlVertical
- End With
- With ch.Chart.Axes(xlCategory)
- .TickLabels.Font.Size = 8
- .TickLabels.NumberFormatLocal = "yyyy/m/d"
- .HasTitle = True
- .AxisTitle.Text = "日期"
- .AxisTitle.Characters.Font.Size = 8
- .AxisTitle.Characters.Font.Color = vbRed
- End With
复制代码
[/code]
With ch.Chart
.HasTitle = True
.ChartTitle.Text = ch.Name
.ChartTitle.Font.Size = 18
.ChartTitle.Left = 137
.ChartTitle.Top = 2
End With
With ch.Chart
.PlotArea.Width = 347
.PlotArea.Left = 0
.PlotArea.Top = 20
.PlotArea.Height = 181
End With
With ch.Chart
.HasLegend = True
.Legend.Font.Size = 8
.Legend.Font.ColorIndex = 5
.Legend.Position = xlLegendPositionRight
End With
[/code]
|
|