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

Trouble with new Graph Controls

1 Answer 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Carl
Top achievements
Rank 1
Carl asked on 29 Apr 2013, 11:18 AM
Hi,

I'm looking for more detailed documentation on the Graph control that was included with the Q1 2013 release. They current documentation on the site gives a very vague explanation of how to set it up. 

Basically what I'm trying to achieve is design a clustered column stack graph with data pulled from the database which looks something like the attached file below.

With the x-axis being the Date and then one stacked column for the "Planned" data and one for the "Actual" data.

What I've tried to do so far is bind the Datasource to the graph, set up the coordinates system with an x-axis TimeDate scale and the y-axis with a numeric scale. When I add a series and try preview I'm given the following message: 

An error has occurred while processing Graph 'graph1'
Year, month, and Day parameters describe an un-representable DateTime.

Am I correct in thinking that what I would need to do to achieve this would be to:
  1. Add the Graph control to the report
  2. Define the DataSource
  3. Set up a coordinate system
  4. Add either a SeriesGroup or CategoryGroup for the Actual and Planned columns.
  5. Add a series for each of the columns in the dataset with each being in the applicable group, using the same Coordinate System for each series.

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 02 May 2013, 09:53 AM
Hello Carl,

We have recently updated the Graph documentation and as we are not sure when you last checked it, please do so. 
As to your scenario, you can either use CategoryScale or DateTimeScale, depending on your data - if you have mostly consequential dates on regular intervals, you can use DateTimeScale; if you have irregular intervals with big differences the CategoryScale will give you better looks. 
As to the Graph itself - the easiest way to create it s by using the GraphWizard as it will set it up for you. 
The required components for the graph are:
  • Coordinate System 
  • Axes
  • CategoryGroups (you need at least one, even if static)
  • SeriesGroups (you need at least one, even if static)
  • Series 
  • values for the series (X/Y/... depending on the type)
  • Series.CoordinateSystem
  • Series.CategoryGroup
  • Series.SeriesGroup
You can find attached a sample report with two graphs implementing your scenario. The first graph is using CategoryScale and is created mostly using the wizard(only a second coordinate system is added). The second graph is using DateTimeScale. 
The important thing in your scenario is that you want two different stacks of columns. To get this, you need to have 2 coordinate systems each with different YAxis (the XAxis can be shared). Each stack belongs to a different axis. By having two Y-Axes you can have two different stacks of columns. 
Half of the series belong to the first coordinate system and form the first stack, the other half belong to the second coordinate system and form the second stack.

Regards,
Elian
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
Carl
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or