Home Forums WinForms controls Xceed Chart for WinForms AddStock() + DateTime.toOADate()

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18695 |

    In your documentation there is an example

    [C#]

    stock.AddStock(new DateTime(2003, 3, 24).ToOADate(), 10, 22, 8, 14);
    stock.AddStock(new DateTime(2003, 4, 14).ToOADate(), 10, 19, 9, 13);
    stock.AddStock(new DateTime(2003, 5, 54).ToOADate(), 17, 25, 12, 16);

    , actually the function prototype is

    [C#]
    public void AddStock(
    double open,
    double high,
    double low,
    double close,
    double x
    );

    In both cases it doesn’t work. The date on the Chart is default and starts with 30 december 1899 00:00. What should i do to display my date? Solution with custom axis labels is not that i want.

    Thank you.

    Imported from legacy forums. Posted by Vladimir (had 2985 views)

    User (Old forums)
    Member
    Post count: 23064

    There seems to be a mistake in the documentation. It should be the opposite :

    m_Stock.AddStock(9, 23, 4, 11, new DateTime(2003, 3, 24).ToOADate());

    Open our Chart Explorer ( Start Menu -> All Programs -> Xceed Components -> Our components in action! -> Xceed Chart Explorer for .NET ), then go to All Examples -> Chart types (Series) -> Stock -> DateTime Stock, for an example on how to use a stock chart.

    You can look at the code by clicking on the “C# Code” tab (you will find the complete source code of the explorer under -> C:\Program Files\Xceed Components\Xceed Chart for .NET and ASP.NET 4.0\Samples).

    (There is also the VB.NET code in one of the subfolder)

    Imported from legacy forums. Posted by André (had 3207 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.