Hi,
I have an issue with Axis ToolTip in xamWebChart. My requirement is to have some predefined width for Axis Label and if the text width is more than the defined width, then the text should be truncated with an ellipse and the entire text should be appearing in the ToolTip. Since by default there is no option to configure the Axislabel, I have created custom style and applied it to the Axis Label but then here, i am not getting the entire Text String in the Text property which i have binded as follows.
XAML Style :
<
Style x:Key="AxisLabelStyle" TargetType="igWebChart:Label">
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="igWebChart:Label" >
igWebChart:XamWebChart.Axes>
<igWebChart:Axis AxisType="PrimaryX">
Please guide me like what i am missing or any other alternative for achieving the same.
Hello,
Thank you for your post. I have been looking through it and I created a sample project for you using your code. I just set the Width of the TextBlock, so that the Text exceeds it and everything works as you want. Please let me know if this meets all your requirements or you need further assistance on this matter.
Looking forward fort your reply.
Hi Stefan,
I have already tried setting the width of the textblock, but even then i am unable to show the entire text in the Tooltip.
<Style x:Key="AxisLabelStyle" TargetType="igWebChart:Label"> <Setter Property="Template" > <Setter.Value> <ControlTemplate TargetType="igWebChart:Label" > <TextBlock Text="{TemplateBinding Text}" ToolTipService.ToolTip="{TemplateBinding Text}" Width="30" RenderTransformOrigin=".6,.5" FontSize="8" TextTrimming="WordEllipsis" > <TextBlock.RenderTransform> <TransformGroup> <RotateTransform Angle="60" ></RotateTransform> </TransformGroup> </TextBlock.RenderTransform> </TextBlock> </ControlTemplate> </Setter.Value> </Setter> </Style>
Hello again,
It seems like I am missing something. Did you try the sample I create for you to see how it behaves. If you did what was the result. I attached a video showing how the sample works on my side. If you still need any assistance please provide me with some more information about what is your project about what data do you use and some details about the Visual studio, windows and Infragistics product versions.
Looking forward for your reply.
Hello Selvin,
Now I succeed in reproducing your behavior and it seems like that once the Text of the Label is trimmed, because of the binding, it is trimmed in the ToolTip, too, so there isn’t a way to prevent this from happening.
I am attaching the screenshot of the results. As per my observation, if the number of datapoints in the Chart increases then the ToolTip doesn't list entire text. In your example, you can further try by increasing 8-10 datapoints in the chart so that you can get the same scenario what i am getting.
I am using XamWebChartv11.1
Thanks,
Selvin
L&T Infotech
I have been looking through the sample you send me and it seems like everything works as expected on my side. If I have a Switzer… label when I hover it with the mouse the tooltip is Switzerland etc. If you could provide me with some screenshots of the results you get I will be able to investigate your issue further for you.
Thanks again for your prompt reply, I saw your sample, and its working perfectly and when i applied the same in my project this was not working as expected. Finally after some observation i increased the number of datapoints in your sample and the found out the problem. So when i increase the datapoint this doesnt work as expected. Can you help me out with some solution or workaround for the same.
I have attached the project for your reference.