Hello
I'm using XamDataChart Infragistics v12.2
I'm trying to achieve following chart: (see attachment)
Soo this is just a quarter data. For each quarter we have a value. For this, I'm using LineSeries (red color).
Now, when this is done, I would like to show aggregated results per year (lets say: avarage). Soo this should be a ColumnSeries, where each column spans from Q1 to Q4 (orange color)
My problem is that I cannot find a good solution.
- If I use one CategoryXAxis, the amount of rows in each series is not equal (obviosuly year rows = quarter rows / 4), so my year series ends in 1/4 of the graph width
- If I use two CategoryXAxes, then it's better, however the columnSeries columns are not perfectly align to the quarters of the first axis.
- If I use NumericXAxis for the line, there seems to be no column series that works with that.
Is there anything you can advice?
Hello,
Thank you for your post. I have been looking into it and I can suggest using a custom series that will render the columns which will match the quarter of a Year. I have created a sample application for you, that shows how you can implement custom Scatter Column Series that allows you to set X and Y member paths to position the column and RangeMemeber path that allows you to determine the width of each column. To implement the custom series I have created a class that derives from the ScatterBase class and override its RenderSeriesOverride, in order to implement the appearance that you have described.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thx Krasimir - this is really helpfull!
It is indeed what I was looking for. Just quick question:
at the first place I choosen CategoryXAxis, because in our application user can scroll the chart (magnify etc..), and then CategoryXAxis somehow changes the labels to fit into View.
However, with NumericXAxis (as in your sample) that functiuonality seems to be missing. If I zoom the chart, the X axis labels don't really change (I may only set the Interval..)
Is there somehow a way to have both functionalities (your custom scatter series and the axis "auto interval" feature...)?
Thank you for your reply. I am very glad that the sample application was helpful for you. Regarding the auto range functionality, you can use it and for the NumericXAxis also. You can remove the MinimumValue, MaximumValue and Interval properties of the definition of the Axis and it will automatically calculates the range and the interval for you. Also you should change the implementation of the converter for the Label, in order to avoid formatting issues when casting the double value of the axis to int. I have modified the sample application that I have attached with my previous email in order to demonstrates the approach that I have described.
I think this is what we need!
I truly appreciate your efford Thx a lot!
Thank you for your reply. I am very glad that the sample application helped achieving the appearance that you are looking for. Please let me know if you need any further assistance on the matter.