This is a migrated thread and some comments may be shown as answers.

Create a simple Column Chart with data

2 Answers 254 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adrian
Top achievements
Rank 1
Adrian asked on 19 Feb 2019, 09:04 PM

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 Answers, 1 is accepted

Sort by
0
Ricardo
Top achievements
Rank 1
answered on 19 Feb 2019, 10:22 PM
Apparently charts only like DateTime and not DateTimeOffset
0
Silviya
Telerik team
answered on 22 Feb 2019, 03:31 PM
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
Tags
General Discussions
Asked by
Adrian
Top achievements
Rank 1
Answers by
Ricardo
Top achievements
Rank 1
Silviya
Telerik team
Share this question
or