Multiiple axis chart (candle & line mixed) - tooltip not working

i have a wpf app with a chart on it.


when i only have 1 axis with 1 series (candle) the tooltip works

now i add a second series (line) tooltips stop working.


see screenshot.


how can i fix that?


Attachment: issuetooltip_a9decb8d.zip

1 Reply

DD Devakumar Dhanapoosanam Syncfusion Team April 21, 2022 12:13 PM UTC

Hi Andreas,


We can resolve the reported problem by setting ChartTrackBallBehavior UseSeriesPalette property value as true for multiple combination chart as per in the below code example.


<chart:SfChart.Behaviors>

    <chart:ChartTrackBallBehavior UseSeriesPalette="True"/>

</chart:SfChart.Behaviors>


Output:
Chart, line chart

Description automatically generated

(OR)


By using the custom template for the series trackball label using TrackBallLabelTemplate property as per in the below code example.


<chart:SfChart.Resources>

    <DataTemplate x:Key="lineTemplate">

        <TextBlock Foreground="Black" Text="{Binding Item.YValue}" FontSize="10"/>

    </DataTemplate>

 

    <DataTemplate x:Key="candleTemplate">

        <StackPanel Margin="4" Orientation="Vertical">

            <Grid>

                <Grid.ColumnDefinitions>

                    <ColumnDefinition Width="Auto"/>

                    <ColumnDefinition Width="Auto"/>

                </Grid.ColumnDefinitions>

                <TextBlock Text="High : " FontSize="10"/>

                <TextBlock Padding="3,0,0,0" FontSize="10" Grid.Column="1" Text="{Binding Item.High}"/>

            </Grid>

           

        </StackPanel>

    </DataTemplate>

</chart:SfChart.Resources>

 

<chart:CandleSeries ItemsSource="{Binding StockPriceDetails}"

                    High="High" Low="Low"

                    Close="Close" Open="Open"

                    XBindingPath="Date"

                    TrackBallLabelTemplate="{StaticResource candleTemplate}"/>

 

<chart:LineSeries ItemsSource="{Binding Data}"

                  XBindingPath="XValue" YBindingPath="YValue"

                  TrackBallLabelTemplate="{StaticResource lineTemplate}"/>

 


Output:

Chart

Description automatically generated


Please refer the below link for more details.

https://help.syncfusion.com/wpf/charts/interactive-features/trackball#trackball-label-template

https://www.syncfusion.com/kb/11020/how-to-customize-the-trackball-appearance-in-wpf-chart


Please find the sample from the attachment below and let us know if you need any further assistance on this.


Regards,

Devakumar D


Attachment: 174499_dcb8ca42.zip

Loader.
Up arrow icon