Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
430
XamDataChart Tooltip Problem
posted

Hello,

I have a problem with tooltip on my lineserie. I am creating my lineseries in code behind. So with the code below I am trying to create a lineserie and a tooltip for that. But when I came over to my lineserie with the mouse It throws "Can not create top-level child window" error. Could you help about this problem

Thanks

//Create Lineseri

 

LineSeries lineSeri = new LineSeries();

lineSeri.ItemsSource = each.DefaultView;

lineSeri.ValueMemberPath = _vm.ChartYAxisValueMemberPath;

lineSeri.XAxis = xAxis;

lineSeri.YAxis = yAxis;

lineSeri.TrendLineZIndex = 1;

lineSeri.Title = "TestTitle";

//Create Tooltip

 StackPanel spMain = new StackPanel();

TextBlock txtBlock1 = new TextBlock();

 txtBlock1.Text = "TestText: ";

spMain.Children.Add(txtBlock1);

lineSeri.ToolTip = spMain;

xamDataChart1.Series.Add(lineSeri);

 

 

<baseControl:GraphsBaseUserControl x:Class="SPKPlugin.PresentationLayer.HisseDashboard"

             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 

             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

             xmlns:ig="http://schemas.infragistics.com/xaml"

             xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"  

             xmlns:igEditors="http://infragistics.com/Editors"

             xmlns:igDP="http://infragistics.com/DataPresenter" 

             xmlns:Utils="clr-namespace:SPKPlugin.PresentationLayer.Utils"

             xmlns:baseControl="clr-namespace:SPKPlugin.PresentationLayer"

             xmlns:controls ="clr-namespace:SPKGozetim.Common.PresentationLayer.Controls;assembly=SPKGozetim.Common"                    

             mc:Ignorable="d" 

             d:DesignHeight="300" d:DesignWidth="300">

    <baseControl:GraphsBaseUserControl.Resources>

        <ResourceDictionary>

            <ResourceDictionary.MergedDictionaries>

                <ResourceDictionary  Source="pack://application:,,,/SPKGozetim.Common;component/PresentationLayer/Controls/OptionsPanel.xaml"/>

                <ResourceDictionary  Source="pack://application:,,,/SPKPlugin;component/PresentationLayer/StyleTest.xaml"/>

            </ResourceDictionary.MergedDictionaries>

            <ig:StringFormatConverter x:Key="AxisRangeValueConverter" />

            <ItemsPanelTemplate x:Key="ListBoxItemsPanelTemplateH">

                <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" />

            </ItemsPanelTemplate>

            <Utils:IsNullConverter x:Key="IsNullConverter"></Utils:IsNullConverter>

            <Utils:HisseEkleMultiValueConverter x:Key="MultiValueConverter"></Utils:HisseEkleMultiValueConverter>

        </ResourceDictionary>

    </baseControl:GraphsBaseUserControl.Resources>

    <Grid>

        <Grid.RowDefinitions>

            <RowDefinition Height="Auto"/>

        </Grid.RowDefinitions>

                <ig:XamDataChart Name="xamDataChart1"

                                 HorizontalZoomable="True" Grid.Row="0"

                                 HorizontalZoombarVisibility="Visible"

                                 VerticalZoomable="False" 

                                 Margin="0,0,0,0"

                                 Legend="{Binding ElementName=xmLegend}">

                    <ig:SyncManager.SyncSettings>

                        <ig:SyncSettings SyncChannel="Group1"

                                 SynchronizeHorizontally="True"

                                 SynchronizeVertically="False" />

                    </ig:SyncManager.SyncSettings>

                    <ig:XamDataChart.Axes>

                        <ig:CategoryDateTimeXAxis x:Name="xAxis" 

                                              DateTimeMemberPath="TARIH" Gap="2"

                                              Interval="{Binding ElementName=sldYAxisInterval, Path=Value, Converter={StaticResource AxisRangeValueConverter}, ConverterParameter='0'}">

                            <ig:CategoryDateTimeXAxis.LabelSettings>

                                <ig:AxisLabelSettings Location="OutsideBottom" Extent="40"  Angle="270" />

                            </ig:CategoryDateTimeXAxis.LabelSettings>

                            <ig:CategoryDateTimeXAxis.Label>

                                <DataTemplate>

                                    <TextBlock Text="{Binding Item.Date, StringFormat={}{0:dd.MM} }" Margin="-25,0,0,0" FontSize="10" />

                                </DataTemplate>

                            </ig:CategoryDateTimeXAxis.Label>

                            <ig:CategoryDateTimeXAxis.Style>

                                <Style TargetType="ig:Axis">

                                    <Setter Property="MajorStrokeThickness" Value="0"/>

                                </Style>

                            </ig:CategoryDateTimeXAxis.Style>

                        </ig:CategoryDateTimeXAxis>

                        <ig:NumericYAxis x:Name="yAxis" Label="{}{0:P}">

                            <ig:NumericYAxis.LabelSettings>

                                <ig:AxisLabelSettings Location="InsideLeft" />

                            </ig:NumericYAxis.LabelSettings>

                            <ig:NumericYAxis.Style>

                                <Style TargetType="ig:Axis">

                                    <Setter Property="MajorStrokeThickness" Value="0"/>

                                </Style>

                            </ig:NumericYAxis.Style>

                        </ig:NumericYAxis>

                        <ig:NumericYAxis x:Name="yAxisVol" Label="{}{0:N0}">

                            <ig:NumericYAxis.LabelSettings>

                                <ig:AxisLabelSettings Location="InsideRight" />

                            </ig:NumericYAxis.LabelSettings>

                            <ig:NumericYAxis.Style>

                                <Style TargetType="ig:Axis">

                                    <Setter Property="MajorStrokeThickness" Value="0"/>

                                </Style>

                            </ig:NumericYAxis.Style>

                        </ig:NumericYAxis>

                    </ig:XamDataChart.Axes>

                </ig:XamDataChart>

 

    </Grid>

</baseControl:GraphsBaseUserControl>

 

Parents
No Data
Reply
  • 30945
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and I could not managed to reproduce the issue that you have described. I have created a sample application, using the code snippet that you have prodived me with and the tooltip is displayed correctly. I have tested the sample application using the RTMs and the latest service releases of both 11.2 and 12.1 versions.

     

    I have researched the issue and there were an issue with the ToolTip of the XamPieChart, when is used in WPF Browser Application that was causing the same error, when the tool tip of the Slices is being shown.This issue is already fixed and the fix is available in the latest service release of versions 11.2 and 12.1. I have tested the same code in a WPF Browser Application with the builds that I have mentioned and no error is occurring.

     

    Would you please provide me with more details on the conditions under which the issue is appearing and if possible modify the sample application in order to show the issue, so I will be able to investigate what the reason for it might be?

     

    Looking forward to hearing from you.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    ToolTipWithSeriesCreatedInCode.zip
Children