첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.

728x90
반응형
728x170
using DevExpress.XtraCharts;

...

ChartControl chartControl;

...

chartControl.BoundDataChanged += chartControl_BoundDataChanged;

...

private void chartControl_BoundDataChanged(object sender, EventArgs e)
{
    ChartControl chartControl = sender as ChartControl;

    XYDiagram diagram = chartControl.Diagram as XYDiagram;

    if(diagram == null)
    {
        return;
    }

    foreach(Series series in chartControl.Series)
    {
        if(series.Name == "Temperature")
        {
            LineSeriesView seriesView = series.View as LineSeriesView;

            if(seriesView == null)
            {
                break;
            }

            seriesView.AxisX = diagram.SecondaryAxesX[0];
        }
    }
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요