2014-10-23 27 views
2

이미지에는 로그 그래프가 표시됩니다. MS Chart 컨트롤을 사용하여 비슷한 그래프를 만들고 싶습니다. 나는 정상적인 그래프를 로그 그래프로 변환하는 방법이 있다는 것을 알고 있지만 아래의 그래프와 비슷한 수직 및 수평 축선 (밝은 회색의 회색)을 만들 수는 없습니다.MS 차트 컨트롤의 로그 축 가로 및 세로 축

Logarithmic graph with vertical and horizontal axes lines

답변

3

다음과 같이 true에 차트의 축 IsLogarithmic 속성을 설정하고 자신의 MinorGrid를 설정을 시도 할 수 있습니다 :

private static void SetupAxis(Axis axis) 
{ 
    // Set the logarithmic scale mode: 
    axis.IsLogarithmic = true; 

    // Enable the minor grid lines: 
    axis.MinorGrid.Enabled = true; 
    // Set the color of the minor grid lines: 
    axis.MinorGrid.LineColor = Color.Gray; 
    // Set the inverval to 1: 
    axis.MinorGrid.Interval = 1; 

    // Enable the major grid lines: 
    axis.MajorGrid.Enabled = true; 
    // If not set, the major grid lines are defaulted to the black color 
} 

사용법 :

ChartArea area = chart1.ChartAreas[0]; 

SetupAxis(area.AxisX); 
SetupAxis(area.AxisY); 
+0

감사합니다 !!!! !! !! –