Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6717251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:49:49+00:00 2026-05-26T08:49:49+00:00

I created a ScatterSeries chart using the following: public ScatterPlot() { InitializeComponent(); ScatterSeries a

  • 0

I created a ScatterSeries chart using the following:

    public ScatterPlot()
    {
        InitializeComponent();


        ScatterSeries a = new ScatterSeries();
        a.Title = "Series A";

        a.IndependentValuePath = "Key";
        a.DependentValuePath = "Value";

        scatterplot.Series.Add(a);

        ((ScatterSeries)scatterplot.Series[0]).ItemsSource = new KeyValuePair<DateTime, int>[]
         {
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(1), 0),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(2), 150),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(3), 150),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(4), 0),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(5), 0),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(8), 130),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(9), 130),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(10), 0),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(11), 0),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(15), 225),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(16), 225),
           new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(17), 0)
         };

    }

I have a dictionary where every data point is mapped to a separate text label. I was wondering if it is possible to establish a binding such that when I move my mouse over a point, I get the text label instead of the actual number? Any suggestions on how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:49:49+00:00Added an answer on May 26, 2026 at 8:49 am

    Set the DataPoint style …

        <charting:ScatterSeries DependentValuePath="Value"
                                IndependentValuePath="Key">
           <charting:DataPointSeries.DataPointStyle>
             <Style TargetType="{x:Type charting:DataPoint}">
                  <EventSetter Event="MouseEnter" Handler="DataPoint_MouseEnter" />
                  <!--Style.Triggers>
                     <Trigger Property="IsMouseDirectlyOver" Value="True">
                         <Setter Property="ToolTip" Value="Hi There!"/>
                     </Trigger>
                 </Style.Triggers--> <!-- This doesnt work!-->
             </Style>
           </charting:DataPointSeries.DataPointStyle>
           <charting:DataPointSeries.ItemsSource>
                <Binding BindsDirectlyToSource="True"/>
           </charting:DataPointSeries.ItemsSource>
        </charting:ScatterSeries>
    

    but the trigger based tooltip setter didnt work when I tested. The event setter worked though. So quickest fix could be to use that event setter and set the TooltipService.ToolTip from code behind in the handler.

    But if you are using MVVM then you could use some attached behavior to handle this event and set the tooltip explicitly.

    OR

    You could override the ScatterDataPoint template using the above Style and just set template to this NewTemplate …

    Notice that in the ControlTemplate below I have set the ToolTipService.ToolTip to the Tooltip of the DataPoint. So you will have to use the above style to set the Template and the ToolTip …

     <!--  charting:ScatterDataPoint  -->
    
     <Style x:Key="NewTemplate" TargetType="charting:ScatterDataPoint">
        <Setter Property="Background" Value="Orange" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="BorderBrush" Value="#FF686868" />
        <Setter Property="Width" Value="8" />
        <Setter Property="Height" Value="8" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="charting:ScatterDataPoint">
                    <Grid x:Name="Root" Opacity="0">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverHighlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.3" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SelectionHighlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.185" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SelectionHighlight" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF8A8A8A" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="RevealStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.5" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Shown">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Root" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Hidden">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ToolTipService.ToolTip>
                            <ContentControl Content="{TemplateBinding ToolTip}" />
                        </ToolTipService.ToolTip>
                            <Path Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" Stretch="Fill" StrokeThickness="1" StrokeLineJoin="Round" Data="F1 M 0,50L 50,0 100,50 50,100L 0,50 Z " />
                            <Path x:Name="MouseOverHighlight" Stretch="Fill" StrokeThickness="1" StrokeLineJoin="Round" Stroke="{x:Null}" Data="F1 M 0,50L 50,0 100,50 50,100L 0,50 Z  " Opacity="0" Fill="#FFFFFFFF" />
                            <Path x:Name="SelectionHighlight" Stretch="Fill" StrokeThickness="1" StrokeLineJoin="Round" Stroke="{x:Null}" Data="F1 M 0,50L 50,0 100,50 50,100L 0,50 Z " Fill="#FF959595" Opacity="0" />
                        </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
       </Style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a new SharePoint portal for testing purposes using a manually added HOSTS
I created a program using dev-cpp and wxwidgets which solves a puzzle. The user
I created a few mediawiki custom tags, using the guide found here http://www.mediawiki.org/wiki/Manual:Tag_extensions I
I created a single page (with code behind .vb) and created Public intFileID As
Created basic C++ DLL and exported names using Module Definition file (MyDLL.def). After compilation
Created using Sphinx 0.6.5. I know Python's documentation uses reStructuredText , but it has
Created a profile using content provider. After running it correctly, added 3 fields to
Created a new project from the Tab Bar Application template, how can I access
I created a dialog box like this: String response = JOptionPane.showInputDialog(null,message,title,JOptionPane.PLAIN_MESSAGE); I'd like to
Created a phonegap application using jQuery Mobile. Everything is working great for the most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.