SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

1
0

Hello,

one more question please;
Please see the pict below (same SDK example: 2D charts-> Column Chart)

[enter image description here

Just added the Legend and Rollover:

            <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:ModifierGroup>
                    <s:LegendModifier x:Name="LegendModifier" 
                                      ShowVisibilityCheckboxes="False" 
                                      ShowLegend="True" 
                                      Orientation="Vertical" Margin="10"
                                      HorizontalAlignment="Right" 
                                      ShowSeriesMarkers="True"  />
                    <s:RolloverModifier x:Name="RolloverModifier" 
                                        ExecuteOn="MouseMove" 
                                        ShowTooltipOn="MouseHover" 
                                        IsEnabled="True" />
                </s:ModifierGroup>
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>

I’d like to keep Series Name in one place – on Legend and remove it from Rollover tooltip text.
I.e. tooltip shall be “13.7” in this case.

I found how to format the Legend (LegendModifier.LegendItemTemplate SciChart WPF v5 SDK User Manual)
But didn’t find the similar way for Tooltip.

Could you please let me know how to achieve this?

Thanks!

-Egor

Version
5.1
  • You must to post comments
1
0

Fixed:

    <UserControl.Resources>
    <DataTemplate x:Key="RolloverTooltipTemplate1" DataType="s:SeriesInfo">
        <StackPanel Orientation="Vertical">
            <TextBlock Text="{Binding FormattedYValue}" />
        </StackPanel>
    </DataTemplate>
</UserControl.Resources>

and then

            <s:SciChartSurface.RenderableSeries>
            <s:FastColumnRenderableSeries x:Name="columnSeries"
                                          DataPointWidth="1"
                                          Stroke="#A99A8A"
                                          s:RolloverModifier.TooltipTemplate="{StaticResource RolloverTooltipTemplate1}">
            </s:FastColumnRenderableSeries>
        </s:SciChartSurface.RenderableSeries>

I.e. the tooltip template shall be defined for FastColumnRenderableSeries

-Egor

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+