Hello,
I'm developing an application with xamdatachart v17 with visual studio 2017. My problem is that I can't find nothing to let the title box (both axes titles and main Title) fit with the text written. In the picture this fact is really visible for the y axes. Besides, for the y axes, I don't find nothing to reduce the space between the Title and labels and between labels and tickmarks.
the image
Hello Gianluca,
Thank you for contacting Infragistics Developer Support.
I have been investigating into the behavior that you are referring to, but I am currently unable to reproduce a behavior in which the Title text gets cut-off for the XamDataChart axes. From your screenshot, it appears that you are likely setting an Extent and possibly an Angle for the AxisLabelSettings and TitleSettings elements that determine the spacing between the actual axis and the Title and labels. Would it be possible for you to please provide some additional information on what your XamDataChart’s XAML looks like so I may be able to mimic it on my end?
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 17.1.20171.1000 in Infragistics for WPF 2017 Volume 1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Sorry, I missed a thing. Concerning the spacing between labels and ctual axis., I tried removing the margin customization and putting margin to 0 but the result does not change.
I have taken a look at the SeriesBinder sample project that I had posted to your linked forum thread, but I can't really see how this would cause any cut-off in the XamDataChart, as the Title settings should work in the same way.
You had mentioned in a previous response that you are changing the FontSize and Margins of the X and Y axis titles and labels, but have not included any information on how you are doing this. Are you currently using the TitleSettings and AxisLabelSettings elements in order to do this, or are you perhaps digging into the visual tree of the XamDataChart and getting the actual text element that makes up the labels and title for your axes and setting these properties directly? If you are setting these properties directly, I could perhaps see where some cut-off might occur, but I am unsure at the moment.
Would it be possible for you to please provide some additional information on this, including the code changes that you have made to the sample project at the linked forum thread in order to set the rotation, font size, and margins of the axis labels and titles in this case?
Hi.
After some trials I found the problem: it was because f this line in the window resources
<Style TargetType="TextBlock" BasedOn="{StaticResource TextValueStyle}"> <Setter Property="Width" Value="80"/> </Style>
I took this from an example of the IG library and I didn't saw it. Thank you for your time
Regards
Thank you for your update. I am glad you were able to find and resolve the issue you were having with the XamDataChart titles.