Declined
Last Updated: 17 May 2017 11:45 by ADMIN
Ryan
Created on: 02 Sep 2016 12:52
Type: Feature Request
1
Multiple Axes on a Graph
There is no functionality built into the Designer to allow for adding multiple axes to a single graph. You can modify the Designer code manually, but there is very little support if the developer decides to choose this route. I would like to be able to display an unlimited number of axes conditionally and choose which side of the graph they should be placed on conditionally.
3 comments
ADMIN
Stef
Posted on: 14 Sep 2016 15:34
Hi Ryan,

Please check http://www.telerik.com/support/kb/reporting/details/modifying-or-creating-a-report-at-run-time (Modifying or Creating a report at Run-Time).

The recommended approach for creating reports is to use the available Report Designers. In cases, data is not known or its structure will change, you can design a report with the VS Report Designer with test data. There will be code generated in the report's Designer.cs(vb) file that can be extracted and modified for usage at run-time.
The report template should not be modified in events, we even do not expose the processing Graph item to prevent this.

In your case, this is a custom scenario, where you have a Graph item per group of records, each item with different settings depending on data. The Graph item can have multiple coordinate systems (http://docs.telerik.com/reporting/graphhowtoaddsecondaryaxis), which scales' cross-positions must be adjusted to position the new axes. 
In order to be able to control the Axes settings based on data, you can use each CoordinatesSystem's Bindings collection - includes Scale.CrossAxisPositions, YAxis.Style.Visible and XAxis.Style.Visble. For example, check http://docs.telerik.com/reporting/graphhowtousebindingstocontrolcsproperties (How to: Use Bindings to Control the Coordinate System Properties).

An important note, the Graph item can display data from a single data object. Thus regardless the different layout you want to achieve per group by showing/hiding axes, data must be presented in a flatten tabular format. 
For example, you have a collection providing values for data points, collection providing values for the X axis(Category slots). These collections must be gathered into one collection that can be used as Graph.DataSource.

Please note that we can provide you technical instructions about the product features and capabilities, but implementing solutions based on custom requirements is out of the support scope. 

If you have further technical questions, please use the support ticketing system.
Thank you for your understanding.
Ryan
Posted on: 09 Sep 2016 14:46
Ivan,

Sorry - I didn't realize multiple axes could be added through the Visual Studio Designer. I guess I was a little more focused on adding axes dynamically, rather than hiding them conditionally. This still doesn't quite help my cases:
I have a single chart that repeats based on groups in my report. I have several categories with values that are in a single DataSource. Each category needs a separate scale. One or more of these categories may apply to a single chart. It seems that it is not possible for me to setup the axes using the Designer in this scenario. Even modifying the designer code myself, it seems that there is no possible way for me to dynamically align the axes on the left/right sides of the chart based on how many axes are visible.

I posted a very basic question in the forum (except in this example I was only working with a single chart) - http://www.telerik.com/forums/multiple-line-series-with-multiple-axes and it was recommended that I modify the designer code in order to achieve this.

I opened a ticket concerning this last week (ticket #1059187) but was informed that programmatically creating reports is not supported by Telerik.

Thank for the response!
ADMIN
Ivan Hristov
Posted on: 09 Sep 2016 14:25
Hi Ryan,

Our Graph item supports multiple axes and they can be set up using both Visual Studio and Standalone report designers. Additionally, you can change the axes properties in runtime using Bindings. 
However, using lots of axes could make your chart hard to read, that's why we would like to ask you to elaborate further and give us some more details about such a chart, where one would need to add conditionally an unlimited number of axes in a single graph. Such feature would require conditional adding/removing of graph series and/or groups and probably would be hard to design and maintain, so it will be really helpful if you could share your scenario with us.

Regards,
Ivan