Create a simple Column Chart with data

3 posts, 0 answers
  1. Adrian
    Adrian avatar
    3 posts
    Member since:
    May 2018

    Posted 19 Feb Link to this post

    Hi All,

    I have the following structure for a report data source:

     

    public class ReportData {
     
        public List<DataPoint> Readings {get; set;}
     
    }
     
    public class DataPoint {
     
        public DateTimeOffset Day {get;set;}
     
        public double Value {get; set;}
     
    }

     

    I'm not being able to create a column graph that plots this. I'm not sure if groupings are necessary or not, what to use in the series, etc.

     

    I'm using VS2017 designer to design the report. The data source is an object data source of type ReportData

  2. Ricardo
    Ricardo avatar
    1 posts
    Member since:
    Dec 2018

    Posted 19 Feb in reply to Adrian Link to this post

    Apparently charts only like DateTime and not DateTimeOffset
  3. Silviya
    Admin
    Silviya avatar
    335 posts

    Posted 22 Feb Link to this post

    Hi Adrian and Ricardo,

    It mostly depends on what you want to display. The easiest way to setup a chart is to use the Graph Wizard, which will do the heavy-lifting with the initial setup. You can have a DatetimeOffset field in the data and it will be visualized like 2/22/2019 5.26:00:00 PM +02:00, depending on the time zone.

    If you, for example, have values for Fields.Day that are from different time zones, you could set them as Category groups setting Day field inside the Categories box. If you want to have each value from a timezone, you set Series groups setting the Value field inside the Series box (for one summary value, omit the Series box). Finally, as I assume you want to display the values, put them in Values box. Please check this screen shot for reference.

    In order to show local time values only, you need to call a User Function to unify all time zones.

    You can check the related documentation articles here:
     - Graph Structure
     - Connecting to Data
       - Column Charts

    Additionally, please elaborate more on what you want to achieve, so we could give you more specific suggestions.

    Best Regards,
    Silviya
    Progress Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top