Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
595
DateTime with Radial Gauge
posted

Is it possible to display date time data in the radial gauge control?

My senerio is that I have a dataset (see below).  A user can then choose which column he/she wants to display in the guage.  While picking a column to display a user can apply different type of aggregates before displaying it.  For the most part I can handle appling the aggregates to the different types of columns and displaying them on the gauge but I'm having some trouble trying to represent the datetime column in the gauge.  How do I show the min date and max date then show the calculated value via the needle?

ID Name DateClosed NumberOfItemsSold
1 John Smith 12/1/2009 12:12:25 PM 12
2 John Doe 12/12/2009 1:12:25 PM 56
2 Jane Smith 1/1/2010 12:00:25 PM 4
3 James Johnson 2/1/2010 2:1:25 PM 35
4 Leo Simons 6/29/2009 12:2:25 PM 59
5 David Blonde 7/1/2009 1:12:25 PM 27

 

  • 28496
    Offline posted

    you can plot the DateTime data using the DateTime.Ticks property or the DateTime.ToOADate() method.

    if you have labels on your gauge, you can convert them back to DateTimes using the LabelAdding event, like this:

    void xamGauge1_LabelAdding(object sender, LabelAddingEventArgs e)

    {

    e.Text = new DateTime((long)e.Text).ToString();

    }