Impossible to get Graph.DataSource to work in WPF, I (thread question?)

My chart is work beautifly when I use:

chartCollection.Append (measure. GHz, measurement.dB);

But when I try to use this call to the same method, I get nothing on the graph:

Double data = new double [256];
....
Graph DataSource = data;

I know not if there is a suspicion, but I declare chartCollection on the main thread, and then pass it on to a different thread to collect data and it draw in real time.

I could have lived with chartCollection.Append but in this case, I got a lot of data instanteneusly and I want to assign to chart at a time.

Moreover, it seems that you need about 350 ms differ between each card. Add to not cause exception... but in my case I need to delay in all cases (for data) is not a problem.

Thank you!

I'm not very clear on how you mix the table/matrix updates. Here is an example of chart queue adds via the dispatcher (using a class task and assistance as a quick way to simulate the substantive work). You can use any delegate with the dispatcher, so you can assign DataSource in a delegate instead of use the method append on a collection of table.

public partial class MainWindow : Window {
        private readonly ChartCollection chart = new ChartCollection( );

public MainWindow( ) {
            InitializeComponent( );

this.graph.DataSource = chart;

var worker = new Worker( this.Dispatcher, chart.Append );
            Task.Factory.StartNew( worker.DoWork );
        }

private class Worker {
            private readonly Dispatcher dispatcher;
            private readonly Action append;

public Worker( Dispatcher dispatcher, Action append ) {
                this.dispatcher = dispatcher;
                this.append = append;
            }

public void DoWork( ) {
                for( int i = 0; i <= 360;="" ++i="" )="">
                    double value = Math.Sin( i * Math.PI / 180 );
                    this.dispatcher.BeginInvoke( this.append, i, value );
                    Thread.Sleep( 100 );
                }
            }
        }
    }

Tags: NI Software

Similar Questions

  • Impossible to get Silverlight upgrade to work on my Macbook, El Capitan. Any advise?

    Cannot get Silverlight upgrade to work on my Macbook Pro, El Capitan. Any advise?

    Contact the website that requires Silverlight. Microsoft is no longer updated for Silverlight.

  • Impossible to get Google Recaptcha to work

    I have a form using Google Recaptcha, but when I submit him and empty the form on the page of success I can see the value of G-RECAPTCHA-RESPONSE, but if I try to do something with it I get a message error "Variable G is undefined".

    Is not the right way to use the answer or is there a better way to get the recaptcha to work?

    See you soon!

    its ok I think that I have worked on the problem I just had to be defined as FORM ['g-recaptcha-response'] and it works. Thanks anyway!

  • Impossible to get Jquery slider to work in my DW CS4 site

    Hello

    Here is the site I built for my new company.  I need to get a cursor of work corresponding to the image of social media 972 x 432.  I don't want any text outside this space, and I don't want all the previous and next icons, or anything like that.  Just a simple slider that fades or wipes:

    http://designerandpublisher.com/business

    I tried to play with the downloads here:

    http://slidesjs.com/#examples

    But I can't make it work on my site.  I'm more of a designer to a developer, that's why I tend to run into issues such as (I want another head on me who does nothing but develop - smile).

    I look forward to do this because I have a business meeting the week next to raise money and operate.  I'd appreciate any help you can give me and if you want to copy and paste my site and then play with the blade, feel free to do so.

    Thank you - guys deaf

    You have the .slideshow dimensions reversed.  Try this in your CSS:

    . Slideshow {height: 432px; width: 972px ;}}

    Nancy O.

  • Impossible to get a javasript alert work in FF, but the same alert works in Internet Explorer, Chrome, Opera.

    Just trying to get the alert message below to display in FF, but it won't. It works in other browsers. I checked the settngs in Options/content and Javascript is on. This may be obvious, but I don't see anything.

    Alert ("example message!");

    Try your attribute of type "text/javascript". Firefox is not running jscript.

  • Error code 8E5E0147, impossible to get Windows Update to work

    When I try to download windows updates I get the following error code: "8e5e0147" and none of the updates will be installed. I now like 15 important updates.

    I already searched this forum and other forums of solutions, but none of those I've tried seems to fix the problem. That's what I tried:

    • Disabled Antivirus and firewall software
    • Tried to install updates and
    • Manually install the updates by microsoft download. This give me an error code, just "failed to install".
    • Run a checkdisk, no errors.
    I would be really happy for more information, which will solve this problem for me. It is very annoying. It is the system that I use if that would be any help:
    HP Pavilion dv 7 laptop
    Windows 7 Edition Home Premium x 64
    Intel Core i7

    Norton and McAfee applications are notorious for not to uninstall (or upgraded) themselves.

    1. download the Norton Removal Tool, save it to your desktop: ftp://ftp.symantec.com/public/english_us_canada/removal_tools/Norton_Removal_Tool.exe

    1B. download the tool McAfee Consumer Product Removal, save it to your desktop: http://download.mcafee.com/products/licensed/cust_support_patches/MCPR.exe

    2. close all open applications (that is, anything with an icon on the taskbar).

    3. click right on the file saved in # 1 above, and then select run as administrator to run the utility. DO TAP not your keyboard until the race ends, then restart.

    4. click right on the file saved in # 1 b above, and then select run as administrator to run the utility. DO TAP not your keyboard until the race ends, then reboot again.

    5 reset IE8 settings advanced by http://windows.microsoft.com/en-US/windows7/Reset-Internet-Explorer-settings [trust me]

    6. open IE8 32 bit (only) to http://support.microsoft.com/kb/971058 & run it in DEFAULT and modes difficulty then AGGRESSIVE. [1]

    7 restart once again & test.

    Note: Make sure you can update MSE manually. If you can not, you have a bigger problem on your hands.

    ~~~~~~~~~~~~~~~~~~~~~~~~
    [1] full Disclosure: the difficulty operating in AGGRESSIVE mode will remove your update history but not list the updates installed in Add/Remove Programs (Windows XP) or installed updates.

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Impossible to get windows update to work

    always have the icon at the bottom of the right hand that says: "windows cannot check for updates...". It is vista home... I get 80070002 update error... I followed the steps to solve this problem, and still nothing... someone knows alternatives? summer in this way for a while

    Vista SP1 or SP2 installed?

    What application or antivirus security suite is installed and your current subscription?  What anti-spyware (other than Defender) applications?  What third-party firewall (if applicable)?

    A (another) Norton or McAfee application has already been installed on the computer (for example, a free trial version which is preinstalled when you bought it)?

    Have you tried to do a Reset? http://support.Microsoft.com/kb/971058

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Impossible to get WRT300N/Atheros AR5009 working draft-N

    My HP laptop with Vista Home Premium is an Atheros AR5009, which is supposed to work with draft-N card.  Unfortunately, I can't get my WRT300N and the AR5009 to connect to any better than g speeds.  I tried first to specify the router to run only at the draft-N, then the laptop couldn't connect.  I tried to find an option for the adapter work on the project-N only, but failed.  I read a few forums where they said that the problem was that WPA2 security must be used, so I mounted that - no change.  HP of not responding on their end, so I hope that someone else had my problem and can offer a solution.

    Nevermind, I managed to solve the problem on my own.  The router and the wireless card must be set to WPA (not WPA2) encryption.  Strange, but it works.

  • Impossible to get Google earth to work; Google Earth has stopped working

    I can't Google earth to work after downloading Google earth, when I try to use it I get a message that Google Earth has stopped working. Is there a way to tell if my graphics card works or if I need a new graphics card?

    As far as I know, these are the requirements for Google Earth - https://support.google.com/earth/answer/20701?hl=en. Make sure that your PC and graphics are satisfied, and that your graphics card drivers are up to date with the latest version of your PC manufacturer supports the web site.

    - Https://support.google.com/earth/answer/176180?hl=en may be useful. Try what he refers to as switching between DirectX and OpenGL to see if that helps etc..

    Is there any (exact) error message and the error code given? There are clues that are recorded in the Event Viewer log? (look in "Local event viewer" - "summary of administrative events' - 'Criticism' or 'Mistakes' for any reference to the time and date of the accident).

  • Impossible to get trunk port to work on 4402 and 6509

    I'm having a problem getting circuits developed on a pair of 4402 I just expdis preconfigured.

    The switches are running Catos.

    I've tried both using a SHIFT and individual ports on the WLC, and the only way I can access the WLC is when the switch port is configured as an access port.

    Whenever I have change the link mode on, I lose access.

    I tried to restart it and that didn't work either.

    The subnet manager and ap - manager is in vlan 254, and I put the vlan native of the switch ports to VLANs 254.

    I tried all forms of the sheath (desirable, nonegotiate etc.), but I just will not work.

    I use this exact set elsewhere without any problems.

    Controller was originally on 4.2.130 and is now on 5.1.150.

    Someone has an idea or two?

    Very well. First make sure that the wlc which management Manager and thus lies on the same vlan. Also, make sure that it is not signposted in the wlc which means that it is set to '0 '. On the trunk dot1q, assign it vlan native what the wlc is configured for. Make sure that you do not have the global command "tag dot1q vlan native. Also male that the service port has an ip address and not routable in your network.

  • Impossible to get my account to work

    I bought a converter in September 2013 product and paid $89,99. Now, I can't work the converter as it says I need to sign up for the product. I signed up for 1 year initially, so it should still work. I tried to call but has been waiting for more than 20 minutes and I can't get hold of someone for help. Let me know what is the best way and fastest way to solve this problem?

    Hi Katie Hetherington

    Please join Adobe Support on: 800-833-6687

    or

    We also invite you to contact our support at http://adobe.ly/yxj0t6 team

  • Impossible to get AS3 KeyboardEvent to work

    When I use the code below to capture a keyboard event, I get the following error:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    to Racer$ iinit)
    to MyMain$ iinit)

    Can someone tell me why?

    -Code-

    package {}
    import flash.ui.Keyboard;
    import flash.display. *;
    import flash.events. *;
    import of car racing;



    SerializableAttribute public class Racer extends Sprite {}
    //
    public void Racer (): void {}

    stage.addEventListener (KeyboardEvent.KEY_DOWN, keyDownListener);

    }
    private void keyDownListener(e:KeyboardEvent):void {}
    trace ("keyDownHandler");

    }
    }

    }

    Thank you! That's what I was looking for. It works now. I really appreciate your help.

    Casey

  • Impossible to get the touchpad to work - Tecra M2

    I have unknown device in my device manager.

    Touchpad does not work but can use the usb mouse.

    ALPS Touch Pad driver and Toshiba double pointing device utility installed.

    It is a Tecra M2.

    David

    It is not necessary to create a second thread on the same topic.
    You must follow your first thread here:
    http://forums.computers.Toshiba-Europe.com/forums/message.jspa?MessageID=179662

  • Satellite Pro A120 - impossible to get a PCMCIA card work

    OK, I have a problem with cardbus (xp SP2) of my Satellite Pro A120.

    I use the cardbus slot to add conections firewire via an IEEE 1394 cardbus card and have been doing this for a long time. The other night, my computer came into hibernation with the card still in the slot and still in use, and when I tried to use it the next day, the card wasn't working at all.
    So I thought that had died on me and has brought another, this one to be exact [http://www.newegg.com/Product/Product.aspx?Item=N82E16839314003].

    When I plug the new card into the slot, windows starts the installation add something new but can't find the driver, nothing on the CD provided, and it does not conect to windows update to find an ethier. Thus, the new card does not work and do not settle, it appears just with! next to pci device.

    I have searched all over the internet to find the driver, read the manual etc. I even did a fresh install of windows so that he could find the drivers but nope.
    The only thing I can think is the slot does not except 32-bit cardbus, but in my manual it says this:

    «The computer is equipted with a pc card slot which can accomedate type II card.» Any pc card that meets the standards of the industry can be installed. Housing supports 16-bit pc cards, including pc cards 16 multifunction card and cardbus pc cards. CardBus supports a new standard for 32-bit pc cards".

    Any help please

    Thank you

    > I can't find drivers anywhere!
    Usually, it takes the CD with drivers with the product. So if you don't have it try to find the driver on the manufacturers support page.
    Try with this one http://www.belkin.com/support/product/?lid=en&pid=F5U222

    Good luck!

  • Impossible to get a smart to work keyboard

    Keyboard Smart brand new just arrived for my new iPad Pro and I can't make it work.  It does not connect with the iPad.

    Finally solved my problem.  I got the keyboard/carton folded the wrong way and were the three contacts on the keyboard/case do not connect the three contacts on the iPad.  Would have been nice to have some clearer instructions with the keyboard.

Maybe you are looking for