2012-04-24 3 views

답변

1

유 "Z-주문 작업"이 링크를 PrePaint 이벤트 http://support2.dundas.com/OnlineDocumentation/WebChart2005/Annotations.html

검색을

확인 텍스트 주석의 Z 순서를 변경하려면에 대한

+0

이 코드를 시도했지만 myRectAnnotation.Paint (chrOI, e.ChartGraphics)에서 오류가 발생했습니다. Paint는 보호 수준으로 인해 액세스 할 수 없으므로 z 순서를 변경하는 방법을 설명하는 다른 링크/자습서를 알고 계십니까? – Dan

+0

이 답변에서 제공되는 링크는 'Dundas Charts'에 대한 것이고 여기서 질문은 'mschart'로 테제됩니다. – dee

0

내 더러운 솔루션을 시도 했 포인트 차트에서 사용하십시오. 다른 모든 것 위에 모든 데이터 포인트를 다시 그립니다.

Private Sub Chart1_Paint(chart1 As Chart, e As PaintEventArgs) Handles Chart1.Paint 
    For Each chartSeries As Series In chart1.Series 
     Dim ca As ChartArea = chart1.ChartAreas(chartSeries.ChartArea) 
     For Each chartPoint As DataPoint In chartSeries.Points 

      'Determine the position, size and color of the original datapoint. 
      Dim x As Double = ca.AxisX.ValueToPixelPosition(chartPoint.XValue) 
      Dim y As Double = ca.AxisY.ValueToPixelPosition(chartPoint.YValues.First) 
      Dim b As New SolidBrush(chartSeries.Color) 
      Dim width As Double = chartPoint.MarkerSize 
      Dim r As New Rectangle(x - width/2, y - width/2, width, width) 

      'Draw the new datapoint on top of the original (and on top of any annotations) 
      e.Graphics.FillEllipse(b, r) 
     Next 
    Next 
End Sub 
관련 문제