- ©«¤l
- 6
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 50
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2015-12-10
- ³Ì«áµn¿ý
- 2017-10-19
|
¦^´_ 5# stillfish00
S¤j±z¦n¡G
¦b¬ã¨sªº¹Lµ{¤¤¤p©f¤S¹J¨ì¤F¥H¤U°ÝÃDQQ¡A½Ð¤j¤jÌÀ°¦£¸Ñ´b ><
1.´N¬O»¡§é½u¹Ï¤¤ªºXValuesȬO³sÄòªº¡A¤]´N¬OXValues±q2012/10/16~2015/9/16¬O¤£¶¡Â_ªºÈ¡A¦ý¦]¬°ªÑ¥«·|¥ð¥«ªºÃö«Y¡A¥æ©ö¤é´Á¬O¤£³sÄòªº¡A¾ÉPXValues¤j©óÁ`µ§¼Æ720µ§¡C
¦]¦¹indx«ü¦V¤é´Á·|²£¥Í°¾®t¡C¥Ø«e¤p©fªº¸Ñ¨M¤è¦¡¬O±N¥ÎAÄæ¤é´Á©ñ¨ì°}¦C(XValueOutZero)¤¤¡A¦A¥Îindx«ü¦V¦¹°}¦C(XValueOutZero)¡C¤U±¬O¤p©f¥[ªºµ{¦¡½X- Private Sub myChartClass_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long)
- Dim pt_x As Double, interval As Double, indx As Long
- Dim arValues, XValueOutZero
-
- XValueOutZero = Range("A2:A721").Value
- pt_x = 75 * x / ActiveWindow.Zoom
- interval = myChartClass.PlotArea.InsideWidth / UBound(myChartClass.SeriesCollection(1).XValues) '¶Ç¦^¦¹°}¦C¤§ºû«×¤§³Ì°ª¥i¥Îµù¼Ð(¯Á¤Þ)
- indx = Application.RoundUp((pt_x - myChartClass.PlotArea.InsideLeft) / interval, 0)
- indx = Application.Min(Application.Max(1, indx), UBound(myChartClass.SeriesCollection(1).XValues))
-
- With myChartClass.SeriesCollection
- If .Count = 0 Then Exit Sub
- For i = 1 To .Count
- With .Item(i)
- .ApplyDataLabels Type:=xlDataLabelsShowNone
- .Points(indx).ApplyDataLabels Type:=xlDataLabelsShowValue
- .Points(indx).DataLabel.Format.Fill.ForeColor.RGB = RGB(255, 255, 0)
- arValues = .Values
- If i <= myTarget.Cells.Count Then myTarget.Cells(i + 1).Value = arValues(indx)
- End With
- Next
- 'arValues = .Item(1).XValues
- myTarget.Cells(1).Value = XValueOutZero(indx, 1)
- End With
- myVLine.Line.ForeColor.RGB = RGB(0, 0, 0)
- myVLine.Line.Weight = 0.25
- With myChartClass
- If .Axes(xlCategory).AxisBetweenCategories Then
- myVLine.Left = .PlotArea.InsideLeft + (indx - 0.5) * interval
- Else
- myVLine.Left = .PlotArea.InsideLeft + (indx - 1) * interval
- End If
- End With
- End Sub
½Æ»s¥N½X ¦ý¬O³o¼Ë¤l¤Sµo²{vlineµLªkºë·Çªº«ü¦V¥¿½Tªº¤é´Á¡A¦p¹Ï1¡Avline«ü¦Vªº¤é´ÁÀ³¸Ó¬O2015/5/16¡A¦ý¬O«oÅã¥Ü2015/5/19ªº¤é´Á:'(
2. ¥t¥~¡AmyChartClass_MouseMove¬O¦b¶i¤J·Æ¹«¦b¹Ïªí¤¤²¾°Ê³oӨƥóµo¥Í®É©Ò°õ¦æªºµ{¦¡¡A¥¦»Ýn¦³4ӶǤJÈ- myChartClass_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long)
½Æ»s¥N½X ¡A¦ý¦b·Æ¹«¦b¹Ïªí²¾°Ê®É¨Ã¨S¦³°õ¦æ¨ä¥¦µ{¦¡½X¡A¨º»ò myChartClass_MouseMove ¬O«ç»ò±o¨ì³o¨Ç¶Ç¤JȪº©O¡A³o¨Ç¶Ç¤JȤS¬O¤°»ò ?
3. ³Ì«á·Q½Ð°Ý¤j¤j¤U±³o¬qµ{¦¡ªº¥Î·N¬O¤°»ò >< ?- With myChartClass
- If .Axes(xlCategory).AxisBetweenCategories Then
- myVLine.Left = .PlotArea.InsideLeft + (indx - 0.5) * interval
- Else
- myVLine.Left = .PlotArea.InsideLeft + (indx - 1) * interval
- End If
- End With
- End Sub
½Æ»s¥N½X ¥H¤W°ÝÃD¤p©f¦Ê«ä¤£±o¨ä¸Ñ¡A¨D§U¤j¤jÌ¡A°ÝÃD¦h¤S²Â¤]½Ð¦U¦ì¤j¤j®ü²[:Q :Q |
|