Odeslat dotazOdeslat dotaz
 

OdpovědětDisplay dates on X-axis

  • 30. června 2009 16:17Bandaru30 Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    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
    •  

Odpovědi

  • 1. července 2009 16:45Nader Nashed MSFTMSFTUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     Odpovědět
    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", "");

Všechny reakce

  • 1. července 2009 16:45Nader Nashed MSFTMSFTUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     Odpovědět
    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", "");