Hi,
I have a xamchart. I am binding data to the xamcahrt's datapoints dynamically.
For each datapoint, i want to display some text as tooltip. my code looks like this.
="Center">
<igCA:XamChart.Scene>
<igCA:Scene>
<igCA:Scene.GridArea>
<igCA:GridArea MarginType="Percent" Margin="8,8,0,5" />
</igCA:Scene.GridArea>
</igCA:Scene>
</igCA:XamChart.Scene>
<igCA:XamChart.Series>
<igCA:Series
Label="Production"
ChartType="column"
UseDataTemplate="True"
DataPointColor="Different">
<igCA:Series.DataPoints>
<igCA:DataPoint
Value="2"
Label="2002"
Fill="#FFD70005"
ToolTip="Image1"/>
Value="4"
Label="2003"
Fill="#FF6CA224"
ToolTip=" Image2"/>
Value="8"
Label="2004"
Fill="#FF076CB0"
ToolTip=" Image3"/>
Value="5"
Label="2005"
Fill="#FFE6BE02"
ToolTip=" Image4"/>
Value="6"
Label="2006"
Fill="#FF543792"
ToolTip="image5">
</igCA:DataPoint>
</igCA:Series.DataPoints>
</igCA:Series>
</igCA:XamChart.Series>
</igCA:XamChart>
Am I doing any thing wrong. It is not displaying any tooltip.
Actually i want to display a chart as tooltip, not simple text. Please provide me with solution.
Regards
Ritesh
Hello Ritesh,
The tooltips are not getting displayed because you are setting the UseDataTemplate property to true. In this case the chart will not use the default template and will search for a custom DataTemplate defined in the resources.
You can resolve the issue by setting UseDataTemplate to false or keep the value to true but provide a custom template for the points. You can copy and paste the default template from the DefaultStyles\Chart\XamChartDefault.xaml file and set the tooltips to any visual element in the template - the main grid or some of the borders e.g.
<DataTemplate DataType="{x:Type igCA:ColumnChartTemplate}"> <DataTemplate.Resources ..> <Grid x:Name="LegendControl"> <Grid ToolTip="{Binding ToolTip}"> ...</DataTemplate>
There is an example in our Feature Browser that shows setting an Image or XamChart control to the DataPoint's Tooltip. You can check it out under the XamChart-->DataBinding and Interaction-->Tooltips sample.
Let me know if you have any questions.
Hi Vlad,
It is not displaying even after setting UseDataTemplate to false. ANd also i have seen the Tooltips sample in Feature Browser. the same code is not working for me. Please let me know the issue.
Even I faced the same issue. But, ToolTip appeared when I changed the Theme from Default to any other Theme. Not sure what is the problem with the "Default" Theme. But Tooltip appears for other themes.
Someone from Infragistics can explain!!
vidyar84,
I've created a private case for you (CAS-55001-CD72JS) and I'm going to research this issue. When I have more information, I will let you know through the case.
Is it necessary to assign a tooltip with every data point for the tooltips. Cant we set it for the series somehow? My series is mapped to datatable column, thus i dont have data points defined explicitly. How can i get tooltips for the line charts?