C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Custom Labels on a Time X Axis

rated by 0 users
This post has 1 Reply | 2 Followers

Not Ranked
Posts 1
andremeurer Posted: Fri, Jun 12 2009 4:42 AM

Hi there,

I want to plot a line using a Time XAxis (IsTime=True) but instead of the automatic dates, I want to display a custom label on the X Axis, which in my case is the difference from the start date, like so: 

  • 1 day
  • 1 week
  • 2 weeks
  • 1 month
  • 6 months
  • etc.

So while my XYDataSeries contains date values for the X axis, I want to:

  1. Specify what are the data points for which labels are displayed (note from the list above that they are not evenly spaced)
  2. Display a custom label for each of those points, instead of the date

Ideally I'd be able to create my XYDatSeries in this manner:

            return new XYDataSeries
                       {
                           XValuesSource = myData.Dates.ToArray(),
                           ValuesSource = myData.Values.ToArray(),

                           // This is what I'd like to do: specify a custom label for my dates
                           XLabelsSource = myData.DateLabels.ToArray()
                       };
 

Thanks for your help

Top 10 Contributor
Posts 1,005
C1_AlexT replied on Tue, Jun 16 2009 5:36 AM

Hi,

This feature will be available in new V2 release. The labels can be specified as pairs of label and axis value or with axis
ItemsSource/ItemValueBinding/ItemLabelBinding properties.

--
Best regards,
Alex

Page 1 of 1 (2 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.