2013-09-30 3 views
0

Box Plot의 경우 차트 영역에 평균, 중앙 및 표준 편차를 표시하고 싶습니다. 추가 범례 도구를 사용하여 맞춤 범례 도구를 사용할 수 없으므로 사용할 수 없습니다.Teechart 추가 범례 도구

문제는 저의 축 Axis.Can 누군가가 빈 공간에 여분의 전설을 배치 할 수 없다는 것입니다.

답변

0

ExtraLegend 도구 사용자 지정 위치를 계산하기 전에 차트를 다시 그리기 때문에 문제가 발생한다고 생각합니다. 내 제안 코드 도움을 당신이 당신의 문제를 해결하는 경우

Private Sub Form_Load() 
    TChart1.AddSeries scBox 
    TChart1.AddSeries scBox 
    TChart1.Series(0).FillSampleValues 5 
    TChart1.Series(1).FillSampleValues 5 
    TChart1.Legend.LegendStyle = lsValues 
    TChart1.Series(0).asBoxPlot.Box.Brush.Color = vbRed 
    TChart1.Series(1).asBoxPlot.Box.Brush.Color = vbBlue 
    TChart1.Tools.Add tcExtraLegend 
    TChart1.Tools.Items(0).asExtraLegend.Series = TChart1.Series(1) 
    'Use internal Repaint to calculate the position of Legend. 
TChart1.Environment.InternalRepaint 
    With TChart1.Tools.Items(0).asExtraLegend.Legend 
    .CustomPosition = True 
    .Left = TChart1.Legend.Left 
    .Top = TChart1.Legend.ShapeBounds.Bottom + 10 
    End With 
End Sub 

는 당신이 우리를 말씀해 주시겠습니까 : 당신은 내가 ExtraLegend 도구는 원래 전설에 정렬 그린 나는 다음 간단한 코드에서와 비슷한 일을 할 수 있습니까?

희망합니다.

감사합니다.