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

  • SEARCH
  • Home
  • 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 8775671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:51:50+00:00 2026-06-13T18:51:50+00:00

In my WPF application I have a D3 ChartPlotter where I was able to

  • 0

In my WPF application I have a D3 ChartPlotter where I was able to plot 4 LineGraphs. This is the XAML code:

<d3:ChartPlotter Name="plotter">
    <d3:ChartPlotter.HorizontalAxis>
        <d3:HorizontalAxis Name="timeAxis" />
    </d3:ChartPlotter.HorizontalAxis>
    <d3:ChartPlotter.VerticalAxis>
        <d3:VerticalAxis Name="accelerationAxis" />
    </d3:ChartPlotter.VerticalAxis>
</d3:ChartPlotter>

where d3 is the namespace for DinamicDataDisplay, and this is (relevant part of) the code behind.

var x = new List<int>();
var y = new List<int>();
for (var t = 0; t <= 10; t = t + 1) { 
    x.Add(t);
    y.Add(Math.Pow(t,2));
}

var xCoord = new EnumerableDataSource<int>(x);
xCoord.SetXMapping(t => t);
var yCoord = new EnumerableDataSource<int>(y);
yCoord.SetYMapping(k => k);

CompositeDataSource plotterPoints = new CompositeDataSource(xCoord, yCoord);

plotter.AddLineGraph(plotterPoints, Brushes.Red.Color , 2, "MyPlot");

What I want to do now is remove this plot and redraw it using a different set of points. Unfortunately I’m unable to find anything that goes in that direction both in the (poor) documentation of D3 and in the web.

Any suggestion about what to do or where to look?

Thanks!

  • 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-06-13T18:51:51+00:00Added an answer on June 13, 2026 at 6:51 pm

    The best way that I have found to do this, is to have a Property in your code behind that represents the DataSource and bind the chart’s DataSource to that property. Have your code behind implement INotifyPropertyChanged and call OnPropertyChanged every time you update or re-assign your data source. This will force the plotter to observe the binding and redraw your graph.

    Example:

    EnumerableDataSource<Point> m_d3DataSource;
    public EnumerableDataSource<Point> D3DataSource {
        get {
            return m_d3DataSource;
        }
        set {                
            //you can set your mapping inside the set block as well             
            m_d3DataSource = value;
            OnPropertyChanged("D3DataSource");
        }
    }     
    
    protected void OnPropertyChanged(PropertyChangedEventArgs e) {
        PropertyChangedEventHandler handler = PropertyChanged;
        if (handler != null) {
            handler(this, e);
        }
    } 
    
    protected void OnPropertyChanged(string propertyName) {
        OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
    } 
    

    If you require more information, the best resource I could find were the CodePlex discussions where D3 is Located:
    Discussions

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my WPF application I have this: <StackPanel> <TextBlock> <Hyperlink> <TextBlock TextWrapping=Wrap Name=HyperlinkText />
In my WPF application I have some drawing functionality. I have solved this using
In a WPF application I have a ListView: <ListView Name=ItemSelList ItemsSource={Binding ItemColl} SelectionChanged=ItemSelList_SelectionChanged> <ListView.View>
In a WPF/MVVM application I have a custom control on a particular view. This
In my WPF Application I have an GridViewColumn that looks like this: <GridViewColumn Width=170>
I have WPF application with one main window . In this window there are
I have a WPF application, and I subscribe to the event AppDomain.AssemblyResolve (this event
In code behind file of the main window of WPF application I have a
I have WPF application, Which works fine on my PC. As this application is
In my WPF application I have a Canvas in which I do some drawing.

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.