Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Chart > Time formatted X-Axis

Answered Time formatted X-Axis

Feed from this thread
  • Posted on May 31, 2011 (permalink)

    hi,

    I'm reading a column from a Excel file including time data with hh:mm:ss format.
    I couldn't show them properly using RadChart in X-Axis. I've used the following code:

    radChart.DefaultView.ChartArea.AxisX.IsDateTime = true;
    radChart.DefaultView.ChartArea.AxisX.Step = 5;
    radChart.DefaultView.ChartArea.AxisX.LabelStep = 2;
    radChart.DefaultView.ChartArea.AxisX.StepLabelLevelCount = 3;
    radChart.DefaultView.ChartArea.AxisX.StepLabelLevelHeight = 10;
    radChart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "hh:mm:ss";

    in X-Axis it only shows 00:00 !?
    What's the solution?

    Reply

  • Giuseppe Giuseppe admin's avatar

    Posted on Jun 6, 2011 (permalink)

    Hi Libertad,

    Please excuse us for the delay.

    Regarding your issue, the X axis makes all the needed range calculations and when there is data for the past several days it displays the steps as one day, therefore each tick is 00:00.

    You can use the following options.
    1. Use Categories. See the link below for more information:
    http://www.telerik.com/help/silverlight/radchart-features-categorical-charts.html
    2. You could also set the AxisX.AutoRange to false and pass only min, max and step parameters(i.e. AxisX.AddRange(min, max, step)).

    You can also find useful information about DateTime Support here:
    http://www.telerik.com/help/silverlight/radchart-features-datetime-support.html

    If you need any further help, please do not hesitate to ask.
     

    Greetings,
    Petar Horozov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • Posted on Jun 7, 2011 (permalink)

    Dear Petar
    Thanks for your reply.
    I even applied AddRange method in my code but I still have problem with time formatting.
    How can I attache my sample here?
    Thank you in advance.

    Reply

  • Peshito Peshito admin's avatar

    Posted on Jun 10, 2011 (permalink)

    Hello Libertad,

    I attached a sample project that should be similar to yours. Please take a look at it and you may find it helpful.

    You can also refer to the following topics below.
    http://www.telerik.com/help/wpf/radchart-features-datetime-support.html
    http://www.telerik.com/help/wpf/radchart-getting-started-create-data-bound-chart.html

    For security reasons zip attachments are not allowed in the public forums but you can open a formal support ticket and send us your sample application should you have further questions.


    Greetings,
    Peshito
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Attached files

    Reply

  • Posted on Jun 10, 2011 (permalink)

    Hi,
    Due to dynamic issue I have to configure my chart in code behind not xaml.
    I wonder if you do some changes in my sample to solve the problem instead of creating new sample from scratch.
    Thanks.

    Reply

  • Posted on Jun 14, 2011 (permalink)

    No answer?

    Reply

  • Answer Peshito Peshito admin's avatar

    Posted on Jun 15, 2011 (permalink)

    Hi Libertad,

    I suggest that we keep the conversation in a single thread so that it is easier for both sides to follow it.

    I edited the project you've attached in the other thread started by you and attached it to this one.

    The reason why your values are displayed as 00:00 is because you've made new SeriesMapping instance in your for loop. At the end of the for loop, I simply added the following code:
    seriesMapping.ItemMappings.Add(itemMappingX);


    Regards,
    Peshito
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Attached files

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Chart > Time formatted X-Axis
Related resources for "Time formatted X-Axis"

WPF Chart Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]