질문하기질문하기
 

답변됨Display dates on X-axis

  • 2009년 6월 30일 화요일 오후 4:17Bandaru30 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi,
         I have to plot a chart based on three columns, first column consists of dates which may be reoccuring in the column, second column has status and third column has count. I am just databinding the table column for the series based on status and the resulting chart is totally bad where the dates are reoccuring and all messed up.

    Table..
    Date           Status                   Value
    05/21/09     New                        3
    05/22/09     Order Placed            5
    05/22/09     Order approved        3
    05/23/09     Returned                  1
    05/23/09     Closed                     3
    05/24/09     Closed                     2

    So if I use the above table, I get the chart but the dates 22 and 23 are appearing twice on the X-axis with normal interval. How should I program if the dates are same. Any Help is much appreciated and Thanks a lot for your Help.

    Regards,
    Bandaru
    •  

답변

  • 2009년 7월 1일 수요일 오후 4:45Nader Nashed MSFTMSFT사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    I am assuming you need to create a series for each status type in your Status Column and have your Y value as your Value column

    The follwing API should work, it will group the series by Status and set the X value to Date and Y value to Value
    chart1.DataBindCrossTable(datasource,

    "Status", "Date","Value", "");

모든 응답

  • 2009년 7월 1일 수요일 오후 4:45Nader Nashed MSFTMSFT사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    I am assuming you need to create a series for each status type in your Status Column and have your Y value as your Value column

    The follwing API should work, it will group the series by Status and set the X value to Date and Y value to Value
    chart1.DataBindCrossTable(datasource,

    "Status", "Date","Value", "");