Hello
I am drawing a XamDataChart based on a FlatDataSource on which I am having some problems with the layout of X-Axis. See screenshot.
I have rotated the X-Axis label to 70 degrees, which causes two issues:
1) The text gets cut off. I seems like I never can be wider than the bar in total. The second last column should be “Department of development and planning”. You can see on the screenshot the requiered space already has been reserved under the chart. There should be plenty of space to show all text. This is a big and important issue for me.
2) The text gets blurry and unclear. I tried to change the font, but it seems to be the same.
I followed the implementation instructions from the post: https://ko.infragistics.com/community/forums/t/108445.aspx
Created a style like this and setting it on the OlapXAxis:
<UserControl.Resources>
<Style TargetType="ig:OlapLabelControl" x:Key="OlapLabelControlStyle">
<Setter Property="LayoutTransform">
<Setter.Value>
<RotateTransform Angle="70" />
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
Do you have any suggestions/workarounds for this matter?
Hello logimatic,
Thank you for contacting Infragistics and providing the forum post. I was able to quickly determine that we are implementing a fix so it's possible to rotate the OlapX-Axis labels with the built-in AxisLabelSettings.Angle property, without having to use a style.
I have created case for you with ID CAS-183707-N8H3R0. You could reach your case following the link bellow:
https://ko.infragistics.com/my-account/support-activity I will update you via the mentioned case, so if you have any further questions or comments please update your case.
After extensive testing the OlapXAxis was not implemented to support the AxisLabelSettings.Angle property. While it was fairly simple to get the labels rotated, this caused various issues in the presentation of the labels when they are rotated. This should be considered as a new feature.
Let me know if you have any questions.
You can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com>.
There are many benefits to submitting a product idea:
Direct communication with our product management team regarding your product idea.Notifications whenever new information regarding your idea becomes available.Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.Allow you to shape the future of our products by requesting new controls and products altogether.You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea:
1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).
2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
3. Add your product idea and be sure to be specific and provide as much detail as possible.
- Explain the context in which a feature would be used, why it is needed, why it can't be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
- Include a link to this thread in your idea so product management will be able to look back at this case.
The Product Idea site puts you in the driver's seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Hi Rob
Thanks for your code - it looks good. However I still have two issues:
1) Can the extent be set automatically? I have implemented an OlapAxisExtender like you demonstrated on: https://ko.infragistics.com/community/forums/t/108445.aspx. My axis is pretty dynamic and would be nice if the graph labels could autosize
2) If I use a date in the axis and it is grouped by year, month it does not show correct. Would the approach be to do it the normal way when using dates and your example here when using strings?
Thanks for the provided code. It seems to be working, however it gives me a couple of problems:
1) If the OlapXAxis type is Date and it is grouped by year, month and day, it does not show correct. The year and month is not placed correctly. Is the best solution to use default functionality when using the dates and the workaround when using strings?
2) Is the someway to determine the Extent automatic? I used your advice from this thread and used an OlapAxisExtender: https://ko.infragistics.com/community/forums/t/108445.aspx
Hi logimatic,
The text clipping that you are seeing is expected since the available width for each label is limited to the width of the chart plot area divided by the number of columns. Your second to last label may visually look like it has available space but the width limit is taken into account when the label is measured by WPF. To deal with this you can give the XamDataChart more width to work with which would increase the width of each column. Another idea may be to retemplate the label and put it in a Canvas which doesn't place any size restrictions on it's children. As long as ClipToBounds is left as False the text will render unimpeded. This will mean, however, that the label text will not be clipped by anything but if you have already allocated enough space to handle it then it's probably ok. I have attached a sample that shows the label using a Canvas.
As for the blurry text, I don't really see that in your above screenshot nor did I see it in my sample. That being said, setting the TextFormattingMode on the OlapLabelControl may help you with this. I looked around online and noticed that people had issues with text being blurry when it was rotated and this property helped. When I applied it I definitely noticed a difference between having and not having it so it may be the thing you need.