Hello,
I'm trying to figure out how to resolve a particular UI glitch with Olap Axis in XamDataChart in developed application. Luckily, I have found a reproduction in official Infragistics WPF 2016.2 Samples Pack (downloaded from HERE). The described problem persists in package 2017.1.
If you open xamDataChart / Display / Olap Axis - Multiple Series Types, you will find a sample chart that should look like in an attachment "1. Olap Axis - initial". Now, I drag two more fields to "Columns" section - for instance Sales Date and Sales Region. The result is shown in the second attachment "2. Olap Axis - multiple columns". As you can see, initially set column "Car" has been hidden by horizontal scrollbar.
I would like to see all labels displayed, not only some part of them, I am OK with vertically shrinked chart. Does anyone have any tips on how could I achieve that?
Cheers!
Artur
Hello Artur,
I have reproduced the behavior that you are referring to, and to resolve it, I would recommend that you apply a new AxisLabelSettings element to the OlapXAxis.LabelSettings property. This AxisLabelSettings element has an Extent property that pushes the space for the labels upward in the OlapXAxis, effectively shrinking the chart, but creating more room for the labels. You can read further about configuring the XamDataChart axis label settings here: https://www.infragistics.com/help/wpf/datachart-axis-label-settings. The code snippet there is for the CategoryXAxis, but the OlapXAxis will work similarly.
I have been in discussion with our development teams on this matter, and they believe that this Extent property should automatically be applied if not explicitly set, and so I have logged a new development issue in our internal tracking systems for this issue. I have also created a private support case for you on this matter with an ID of CAS-186774-L7J2S9, which I will link to this new development issue so that you can track it and be notified when anything changes. I will update this support case with further information shortly, and you can access the support case after signing into your Infragistics account, here: https://www.infragistics.com/my-account/support-activity.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Hello Andrew,
The answer is surely helpful, but I would appreciate some more guidance.
I would like the height of the labels to adjust dynamically when user adds/removes selected columns. When I set the Extent property to fixed value, the height of labels panel is - obviously - fixed. I guess I need a binding, but I have no clue to which property of which element should I bind. So far I tried to bind to the OlapXAxis.Height, but it does not seem to work. In Live Visual Tree I see that element responsible for displaying the labels is OlapLabelPanelHorizontal, but I have no clue as to how should I access it without traversing the elements tree in code-behind.
Any clues?
Cheers,