<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Plotting Multiple Datatypes in Measurement Studio for .NET Languages</title>
    <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3674738#M18878</link>
    <description>&lt;P&gt;Hi Paul,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would you populate Data and what would I want to populate it with? I am using a WritableGraph and it looks like Data has a get method&amp;nbsp;but no set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kelly&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2017 23:12:41 GMT</pubDate>
    <dc:creator>knb</dc:creator>
    <dc:date>2017-08-11T23:12:41Z</dc:date>
    <item>
      <title>Plotting Multiple Datatypes</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3674699#M18876</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have made a graph and I want to plot multiple different types of data. Right now, i have a custom point class, let's call it CustomClass and I am converting everything to the CustomClass before it is plotted, but it would be faster to directly plot some data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ie, I am given some data:&lt;/P&gt;
&lt;P&gt;double[] firstPlot;&lt;/P&gt;
&lt;P&gt;double[] secondPlot;&lt;/P&gt;
&lt;P&gt;List&amp;lt;CustomClass&amp;gt; thirdPlot;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Right now, I loop through firstPlot and secondPlot and convert each of them into a List&amp;lt;CustomClass&amp;gt;. (I also want to add an arbitrary amount of double[] arrays) Then I eventually plot List&amp;lt;List&amp;lt;CustomClass&amp;gt;&amp;gt; by binding it to the datasource. (This part is working but the looping takes too long)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there some sort of collection where I can place multiple different types of data and plot that?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kelly&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 20:58:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3674699#M18876</guid>
      <dc:creator>knb</dc:creator>
      <dc:date>2017-08-11T20:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Multiple Datatypes</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3674723#M18877</link>
      <description>&lt;P&gt;The &lt;A href="http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/98f6bb3e/" target="_self"&gt;&lt;CODE&gt;DataSource&lt;/CODE&gt;&lt;/A&gt; property is used to populate the &lt;A href="http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/152d3171/" target="_self"&gt;&lt;CODE&gt;Data&lt;/CODE&gt;&lt;/A&gt; collection on a graph (similar to how the &lt;A href="https://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.itemssource" target="_self"&gt;&lt;CODE&gt;ItemsSource&lt;/CODE&gt;&lt;/A&gt; property populates the &lt;A href="https://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.items" target="_self"&gt;&lt;CODE&gt;Items&lt;/CODE&gt;&lt;/A&gt; collection on an &lt;A href="https://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol" target="_self"&gt;&lt;CODE&gt;ItemsControl&lt;/CODE&gt;&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the simplest way to populate &lt;CODE&gt;Data&lt;/CODE&gt; with multiple separate data types is to directly change the &lt;CODE&gt;Data&lt;/CODE&gt; collection (rather than trying to match all the types to make something convenient for &lt;CODE&gt;DataSource&lt;/CODE&gt; to split up).&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 21:53:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3674723#M18877</guid>
      <dc:creator>phansen</dc:creator>
      <dc:date>2017-08-11T21:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Multiple Datatypes</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3674738#M18878</link>
      <description>&lt;P&gt;Hi Paul,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would you populate Data and what would I want to populate it with? I am using a WritableGraph and it looks like Data has a get method&amp;nbsp;but no set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kelly&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 23:12:41 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3674738#M18878</guid>
      <dc:creator>knb</dc:creator>
      <dc:date>2017-08-11T23:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Multiple Datatypes</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3674739#M18879</link>
      <description>&lt;P&gt;&lt;CODE&gt;Data&lt;/CODE&gt; is a collection, so you can use standard collection members like the &lt;CODE&gt;Add&lt;/CODE&gt; method or the indexer to assign values in code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;graph.Data[0] = new double[...];
graph.Data.Add( new List&amp;lt;CustomClass&amp;gt;(...) );&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 23:20:52 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3674739#M18879</guid>
      <dc:creator>phansen</dc:creator>
      <dc:date>2017-08-11T23:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Multiple Datatypes</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3676129#M18889</link>
      <description>&lt;P&gt;This appears to be working the first time that I am plotting the graph, but if I change some points in one of the DataCollections and I reassign say graph.Data[0] = someListOfPoints, the entire plot is not showing up. Also, calling refresh() on the graph doesn't help either. How do I make the new DataCollection appear on the graph?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kelly&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 16:53:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3676129#M18889</guid>
      <dc:creator>knb</dc:creator>
      <dc:date>2017-08-15T16:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting Multiple Datatypes</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3676152#M18891</link>
      <description>&lt;P&gt;I was not able to reproduce the issue based on your description. In my test, using just a graph and a button, this code&amp;nbsp;always updated the graph:&lt;/P&gt;
&lt;PRE&gt;private void OnChangeButtonClicked( object sender, RoutedEventArgs e ) {
    int[] array = (int[])graph.Data[0];
    if( array == null ) {&lt;BR /&gt;        // Initial assignment.
        graph.Data[0] = new[] { 1, 3, 2, 4 };
    }
    else {&lt;BR /&gt;        // Modify existing data.
        Array.Reverse( array );&lt;BR /&gt;&lt;BR /&gt;        // Notify graph of change (since array does not have its own change event).
        graph.Refresh( );
    }
}
&lt;/PRE&gt;
&lt;P&gt;In addition to the data, you may want to verify that the associated plot and renderer are visible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you could create a simple test application that reproduces the issue, it would be easier to diagnose what is going wrong.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 17:44:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/Plotting-Multiple-Datatypes/m-p/3676152#M18891</guid>
      <dc:creator>phansen</dc:creator>
      <dc:date>2017-08-15T17:44:04Z</dc:date>
    </item>
  </channel>
</rss>

