I'd like to replicate a graph which looks like the one you can see in the attached screenshot with min and max ranges written to the left side of each respective bar. Please note the number of bars and their values are determined at runtime. I know how to create the bar and lineseries programmatically, but not how to create such layout by code.Please help me in this matter.
8 Answers, 1 is accepted
In order for you to create synced charts, you need to use the same type of axis in each chart and each chart needs to have the same horizontal data, so that the axes end up with the same categories set.
For example you cannot provide 2010, 2011 and 2012 for the first chart and 2011, 2012 and 2013 for the second chart, because the axes will end up with different categories and no alignment of data will be achieved. You need to supply both charts with 2010, 2011, 2012, 2013.
After syncing the horizontal axis categories, almost full alignment will be achieved automatically. Small displacements may occur of you have the vertical axes visible and they have different ranges. In the image you attached, the axes are collapsed so this is not expected to happen.
Let us know if you need more information.
Thank you for the quick reply.
How would your approach look like? I tried to follow the instructions from this link: http://docs.telerik.com/reporting/graphhowtocreateprogrammaticallygraph but I am getting ambiguous reference errors and am not sure which control should be used as a container. Is the above link the right one to follow?
This link is for the reporting components, and you have opened a ticket for the WPF chartview. If indeed you are using the WPF chartview, please look at this online help.
the only thing I found relating to this issue was multi axes, but I find it difficult to setup the vertical axes to get the desired result. Here is what I do:
-Create a common horizonal axis
-Loop through a list of barseries', create a vertical axis for each of them, set the label offset and minimum and maximum of the vertical axis, instantiate a lineseries if necessary, set the horizontal and vertical axes for both series' and add them to the chart
The result is visualized in the attached picture.
As you can see the result is quite far away from what I want to achieve.
I think I already mentioned this in my first post - you need 5 different charts and 5 different horizontal axes. Do you have 5? Then you need to sync the axes. You need to sync them so that you will later get properly aligned axes and series. You sync the axes by passing the same categories in the same order in each series (even if some of the items have to have a null for vertical value).
While not exactly the same, this qsf example demonstrates a similar situation. So does this one. I suggest you invest some more time into getting to know the chartview features so that you can get to use the control in the best possible way. You can examine the sdk samples and the online documentation as well.
thanks again. The program creates a chart for each series collection and adds them to a radgridview. This works mostly, but I encountered several problems:
-Every radchart seems to change when I scroll in the list back and forth.
-After I deselect a row the respective chart changes. Not sure why it happens, but more labels on top of the bars are added and the bars are compressed.
-How can I hide these labels? I don't need them and they just clutter the chart.
-How can I disable the column on the left which only shows an arrow pointing to the right on selection?
-How can I disable row selection?
Overall the direction is right, but some controls look like they need a lot more polish.
I was not able to reproduce any of the things you mention in your first three questions. I am attaching a small project, the one I tested with, and you can see that none of this happens. I suspect that you have some custom code that makes all of this happen, so I suggest you inspect what is going on on your side.
You have also asked two questions about the gridview, to which I am sure that you will find answers either in our online documentation, our qsf examples and our skd samples. If you need further assistance about the gridview, I will ask that you open a new ticket with a product RadGridView, because we prefer to keep issues separated and not clutter one thread. Thank you for understanding.
thanks for the package. Unfortunately the project immediately closes whenever I open it. Not sure why it happens. However I've solved it thanks to another post found on the forums.