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
150
UltraChart ignoring DateTime properties when using BindingList as data source
posted

Slight issue/question with UltraWinChart displaying a LineChart. 

I have a chart which used to use a BindingList as a data source. The BindingList was a collection of my proprietary objects, which have a number of public properties, for instance:

 public class ChartPoint {

    public DateTime Time { get { ... } }

    public int value1 { get { ... } }

    public double value2 { get { ... } }

...
}

However, no matter how much I experimented, I couldn't get the Chart to acknowledge that the first property was of type DateTime. The chart persistently showed "ROW1", "ROW2" etc as row labels. (My chart is a LineChart where I swap the axes, so each "row" is a point on my X-axis which is the time axis). And yes, I did set the TreatDateTimeAsString and RwoLabelsColumn and UseRowLabelsColumn properties.

After digging around these forums I saw another example where somebody had used a DataTable. I tried using one of those, explicitly creating a column of type DateTime, and then adding exactly the same values to the table as object[ arrays. This time around, the chart acknowledged the DateTime values and displayed them properly.

Is this a bug in the way the chart interacts with BindingLists? 

 Many thanks.

 

Parents
No Data
Reply
  • 28496
    Offline posted

     

    i reproduced this issue and fixed it, so it should be resolved in a future hotfix.  the bug # is BR31852.

    feel free to contact Infragistics Developer Support to inquire about the status of this fix, or to be placed on a notification list for when the hotfix is released.

    as a temporary workaround, try adding this property to your class:

    public string TimeString { get { return this.Time.ToString(); } } 

Children