<?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: DateTime XAxis rounding? in Measurement Studio for .NET Languages</title>
    <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/900864#M8564</link>
    <description>&lt;P&gt;Eric -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While using the custom format string may *seem* to provide what I need for formatting the dates, it does not. It is not simply a formatting problem – in the case of the WaveformGraph control the waveform itself appears to be generated improperly.&amp;nbsp;I&amp;nbsp;used the ScatterGraph to show the difference because the ScatterGraph provided me with a way to ensure that the x data values were generated properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are really at least two problems here. One problem is the formatting and I my workaround for that is fine... for now. The more serious issue appears to be the way the x data values are generated in the WaveformGraph. If these values are not generated correctly, a custom formatter is not going to help. To me, this&amp;nbsp;appears to be caused by some form of rounding and/or floating point issue. It does appear to be linear in nature as the discrepancy between the two graphs increases as more data points are introduced (see below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best way to see each problem on a single screen is to&amp;nbsp;drag the cursor&amp;nbsp;on both graphs to the end of the plot (900000 samples with 2 ms interval = 30 minutes of data), then zoom to a very small portion of the end of the plot, then use the right arrow key until both cursors are at the last data point on&amp;nbsp;each plot (if one reaches the end before the other keep using the right arrow until the other reaches the end). As you can see by comparing the values provided by the&amp;nbsp;two cursors, the x values are almost a whole second off.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will be interested in knowing that&amp;nbsp;I have properly characterized the problem(s) I am seeing properly. So please respond with your understanding so we can make sure we get the bug report submitted accurately. Please understand that I am not at all concerned with your ability to grasp the problem. Quite the contrary in fact. I am more concerned that I may not have explained the problem adequately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing to note is that the behavior only manifests itself when the accuracy required for x values is to the millisecond.&amp;nbsp;One need only inspect the way I am generating the x values for the ScatterGraph to see why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even though the problem occurs only when x value granularity is to the millisecond, I would think the accuracy of the waveform would have to be considered a fundamental characteristic of the WaveformGraph control. Accordingly, my hope is that this bug&amp;nbsp;fix will get a high priority.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am glad that you will post the bug ID to this thread. As&amp;nbsp;my application does&amp;nbsp;have a requirement to draw lines on the graph at times that must coincide with the graph, I will be out of luck with the WaveformGraph until this waveform issue is addressed.&amp;nbsp;I expect to release my application in 60-90 days. Consequently, I hope I will have some visibility into the priority given to fixing this issue. I realize that I will need to track this outside of this forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by jsytniak on &lt;/SPAN&gt;&lt;SPAN class="local-date"&gt; 05-04-2009&lt;/SPAN&gt;&lt;SPAN class="local-time"&gt; 02:12 PM&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 04 May 2009 19:12:03 GMT</pubDate>
    <dc:creator>jsytniak</dc:creator>
    <dc:date>2009-05-04T19:12:03Z</dc:date>
    <item>
      <title>DateTime XAxis rounding?</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/898588#M8555</link>
      <description>&lt;P&gt;I am seeing what appears to be some rounding issues with the Xaxis on a Waveformgraph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached a sample. The sample interval has been specified as 2 ms. After app loads, hit the right arrow key to move the cursor to the next sample to see the problem. I would expect it to report a time of 04-29-09 14:28:31.0020 and it reports the milliseconds as 0019&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I say the problem appears to be rounding because the discrepency between the time I expect to see and the time reported by the cursor label widens as one moves further into the dataset. Note how the cursor does not line up on the second line that has been drawn using the DataConverter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have looked for properties name that might suggest a way to control precision and have had no joy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps I need to load the data differently......? I have looked around for that too...... again.... no joy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help and thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2009 16:07:26 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/898588#M8555</guid>
      <dc:creator>jsytniak</dc:creator>
      <dc:date>2009-04-29T16:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime XAxis rounding?</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/899922#M8559</link>
      <description>&lt;P&gt;By the way I am referencing the following versions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference Include="NationalInstruments.Common, Version=8.6.35.131, Culture=neutral, PublicKeyToken=18cbae0f9955702a, processorArchitecture=MSIL"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SpecificVersion&amp;gt;False&amp;lt;/SpecificVersion&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Private&amp;gt;False&amp;lt;/Private&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Reference&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference Include="NationalInstruments.UI, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a, processorArchitecture=x86"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SpecificVersion&amp;gt;False&amp;lt;/SpecificVersion&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Private&amp;gt;False&amp;lt;/Private&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Reference&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference Include="NationalInstruments.UI.WindowsForms, Version=8.6.35.189, Culture=neutral, PublicKeyToken=18cbae0f9955702a, processorArchitecture=x86"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SpecificVersion&amp;gt;False&amp;lt;/SpecificVersion&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Private&amp;gt;False&amp;lt;/Private&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Reference&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2009 18:09:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/899922#M8559</guid>
      <dc:creator>jsytniak</dc:creator>
      <dc:date>2009-05-01T18:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime XAxis rounding?</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/900016#M8560</link>
      <description>&lt;P&gt;I believe I have a workaround. Unfortunately, it involves using a ScatterGraph instead of a WaveformGraph. It also required building a custom FormatString. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sample I am now posting definitely shows an issue with the way the plot is drawn on the WaveformGraph. This is not surprising because it appears that the x values are not being generated properly. I am guaranteeing the x values are being generated properly with the data provided to the ScatterPlot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The CustomFormatString was still necessary even after creating the x data properly. Without the CustomFormatString the exact same incorrect values were displayed as on the WaveformGraph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sample has the WaveformGraph on top and the ScatterGraph on the bottom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While I am glad to have been able to create a workaround for this problem, I am building an application that uses the WaveformGraph as an integral component. The idea of switching over to the ScatterGraph at this stage of our development cycle&amp;nbsp;is not appealing. The issues I am seeing in the WaveformGraph really do look like bugs to me and I am hoping&amp;nbsp;they can be resolved soon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2009 21:28:23 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/900016#M8560</guid>
      <dc:creator>jsytniak</dc:creator>
      <dc:date>2009-05-01T21:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime XAxis rounding?</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/900734#M8563</link>
      <description>&lt;P&gt;Joe,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the detailed research you put in regarding this issue.&amp;nbsp; Looking at your code, if you apply the custom format string to the WaveformGraph cursor as well, you see the same as you see in the ScatterGraph, which should work for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does look like a bug though, so we will be filing a bug report and will post back once the report has been filed with the bug ID.&amp;nbsp; We give you the bug ID so you can ask about the status if you call in.&amp;nbsp; You can also check the release notes whenever a new version of Measurement Studio is released.&amp;nbsp; All of the bugs that have been fixed have their bug ID listed in the readme of every new version of our software (you can see the readme for Measurement Studio 8.6 for Visual Studio 2008 &lt;A href="http://digital.ni.com/public.nsf/ad0f282819902a1986256f79005462b1/b0ae3ce947328781862574520053502c/$FILE/ReadmeVS2008.html" target="_blank"&gt;here&lt;/A&gt; as an example)&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2009 16:25:47 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/900734#M8563</guid>
      <dc:creator>Eric_B.</dc:creator>
      <dc:date>2009-05-04T16:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime XAxis rounding?</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/900864#M8564</link>
      <description>&lt;P&gt;Eric -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While using the custom format string may *seem* to provide what I need for formatting the dates, it does not. It is not simply a formatting problem – in the case of the WaveformGraph control the waveform itself appears to be generated improperly.&amp;nbsp;I&amp;nbsp;used the ScatterGraph to show the difference because the ScatterGraph provided me with a way to ensure that the x data values were generated properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are really at least two problems here. One problem is the formatting and I my workaround for that is fine... for now. The more serious issue appears to be the way the x data values are generated in the WaveformGraph. If these values are not generated correctly, a custom formatter is not going to help. To me, this&amp;nbsp;appears to be caused by some form of rounding and/or floating point issue. It does appear to be linear in nature as the discrepancy between the two graphs increases as more data points are introduced (see below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best way to see each problem on a single screen is to&amp;nbsp;drag the cursor&amp;nbsp;on both graphs to the end of the plot (900000 samples with 2 ms interval = 30 minutes of data), then zoom to a very small portion of the end of the plot, then use the right arrow key until both cursors are at the last data point on&amp;nbsp;each plot (if one reaches the end before the other keep using the right arrow until the other reaches the end). As you can see by comparing the values provided by the&amp;nbsp;two cursors, the x values are almost a whole second off.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will be interested in knowing that&amp;nbsp;I have properly characterized the problem(s) I am seeing properly. So please respond with your understanding so we can make sure we get the bug report submitted accurately. Please understand that I am not at all concerned with your ability to grasp the problem. Quite the contrary in fact. I am more concerned that I may not have explained the problem adequately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing to note is that the behavior only manifests itself when the accuracy required for x values is to the millisecond.&amp;nbsp;One need only inspect the way I am generating the x values for the ScatterGraph to see why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even though the problem occurs only when x value granularity is to the millisecond, I would think the accuracy of the waveform would have to be considered a fundamental characteristic of the WaveformGraph control. Accordingly, my hope is that this bug&amp;nbsp;fix will get a high priority.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am glad that you will post the bug ID to this thread. As&amp;nbsp;my application does&amp;nbsp;have a requirement to draw lines on the graph at times that must coincide with the graph, I will be out of luck with the WaveformGraph until this waveform issue is addressed.&amp;nbsp;I expect to release my application in 60-90 days. Consequently, I hope I will have some visibility into the priority given to fixing this issue. I realize that I will need to track this outside of this forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by jsytniak on &lt;/SPAN&gt;&lt;SPAN class="local-date"&gt; 05-04-2009&lt;/SPAN&gt;&lt;SPAN class="local-time"&gt; 02:12 PM&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 May 2009 19:12:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/900864#M8564</guid>
      <dc:creator>jsytniak</dc:creator>
      <dc:date>2009-05-04T19:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime XAxis rounding?</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/900954#M8565</link>
      <description>&lt;P&gt;Eric - &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good news.... I found another workaround that definitely reduces the *my* urgency for getting the plot fix. With my two workarounds, all of my reported issues with the WaveformGraph object are addressed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now believe it is more accurate to state that the waveform problem&amp;nbsp;may really be solely with the WaveformPlot.PlotY method. I replaced the PlotY&amp;nbsp;method of generating the wave form with the following code and I get the required results with respect to the waveform. It is still necessary for me to use the custom format string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;FONT size="2" color="#008000"&gt;&lt;FONT size="2" color="#008000"&gt;//plot.PlotY(ydata, startDate, TimeSpan.FromMilliseconds(2D));&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;WaveformTiming&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; timing = &lt;/FONT&gt;&lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;WaveformTiming&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;.CreateWithRegularInterval(&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;TimeSpan&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;.FromMilliseconds(2D), startDate);&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;P&gt;&lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;AnalogWaveformPlotOptions&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; options = &lt;/FONT&gt;&lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;AnalogWaveformPlotOptions&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;AnalogWaveformPlotDisplayMode&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;.Time, &lt;/FONT&gt;&lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;AnalogWaveformPlotScaleMode&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;.Raw);&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;AnalogWaveform&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; wave = &lt;/FONT&gt;&lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;AnalogWaveform&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;.FromArray1D(ydata);&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;P&gt;wave.Timing = timing;&lt;/P&gt;&lt;P&gt;plot.PlotWaveform(wave, options);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would expect the WaveformPlot.PlotY method to produce the same waveform/timing combination as the code above.&amp;nbsp;Consequently, I do think a bug needs to be submitted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also curious if the PlotY method is supposed to provide better performance. If so, I would definitely prefer to use a new and improved (and correct)&amp;nbsp;version of the method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/FONT&gt;</description>
      <pubDate>Mon, 04 May 2009 21:01:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/900954#M8565</guid>
      <dc:creator>jsytniak</dc:creator>
      <dc:date>2009-05-04T21:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime XAxis rounding?</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/901908#M8569</link>
      <description>&lt;P&gt;Joe,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for posting that workaround.&amp;nbsp; I applied that to the sample you posted and saw that it did improve the accuracy of the x-values generated.&amp;nbsp; You asked me to explain in your previous post what the problem is, and here is what I understand: &amp;nbsp; When you use the PlotY function on your WaveformPlot and you set a TimeSpan manually, the numbers aren't generated accurately (.001996 when it should be .002, etc).&amp;nbsp; However you are saying your method you use to generate the X data for the ScatterGraph generates the X values correctly, but I do not see that in the example you posted.&amp;nbsp; When I remove the custom formatting on the cursor, it still shows the incorrect data (.001996 instead of .002).&amp;nbsp; In any case, implementing the workaround you noted (building and plotting a waveform) does seem to work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, thanks for the additional information.&amp;nbsp; This will be helpful for our developers. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The bug report was filed and the ID is 164969.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2009 22:23:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/901908#M8569</guid>
      <dc:creator>Eric_B.</dc:creator>
      <dc:date>2009-05-05T22:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime XAxis rounding?</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/902336#M8575</link>
      <description>&lt;P&gt;Eric - &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You just about have it. There are at least two problems as I see it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problems seem to apply only to&amp;nbsp;WaveformPlots with data&amp;nbsp;intervals to the millisecond. The PlotY generation of the X data values is&amp;nbsp;a problem. Another problem is the default display behavior of FormatString.FormatDouble. I cannot speculate how many underlying problems are involved between the problems I can see on the surface. I suspect that logic that is used by the &lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;DataConverter&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;.Convert&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;function is involved&amp;nbsp;but I can only speculate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WaveformPlot.PlotY&lt;/STRONG&gt; - my assertion that PlotY is generating the X values improperly is a guess. I&amp;nbsp;did verify by&amp;nbsp;placing a breakpoint in the code after executing&amp;nbsp;WaveformPlot.PlotY that the values returned by the WaveformPlot.GetXData() were not correct. This could simply mean there is an issue with GetXData but I did see consistency so I ruled that out.&amp;nbsp;Similarly, after generating the ScatterPlot, I used a breakpoint to verify the values I provided to the ScatterPlot constructor were correct. Thing was, even with correct values. I needed a custom FormatString to display the values of the ScatterPlot properly. Also, after seeing that the ScatterPlot rendered differently and appear to line up with the Xaxis differently, I had an idea I was on to something.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FormatString.FormatDouble&lt;/STRONG&gt; - After working through the PlotY/ScatterPlot stuff above, I still needed to correct the display values with the CustomFormatString. I suspect that the logic used by the &lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;DataConverter&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;.Convert&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;function&amp;nbsp;may also be involved&amp;nbsp;within the default behavior of FormatString.FormatDouble. I applied the same principles used to generate the x data for the ScatterPlot to the CustomFormatString.FormatDouble and I had a workaround.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Further, I tried the WaveFormPlot.PlotWaveForm and discovered the discrepancy within WaveformPlot between plot correlation with Xaxis and/or rendering&amp;nbsp;between plots&amp;nbsp;created by PlotY and PlotWaveform. To my glee, PlotWaveform provided the results I require.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2009 14:55:07 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/902336#M8575</guid>
      <dc:creator>jsytniak</dc:creator>
      <dc:date>2009-05-06T14:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime XAxis rounding?</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/903226#M8583</link>
      <description>&lt;P&gt;Joe,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That makes sense to me.&amp;nbsp; Thank you for the detailed notes...they will be a good resource for the developers when they are trying to pin down the root cause of this problem. &lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2009 15:23:47 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/903226#M8583</guid>
      <dc:creator>Eric_B.</dc:creator>
      <dc:date>2009-05-07T15:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime XAxis rounding?</title>
      <link>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/924135#M8721</link>
      <description>&lt;P&gt;Eric -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Found a similar and possibly related problem... The symptoms here&amp;nbsp;may refute my suspicions of the logic within&amp;nbsp;your &lt;FONT size="2" color="#2b91af"&gt;&lt;FONT size="2" color="#2b91af"&gt;DataConverter&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;.Convert&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do some custom drawing on my plots to change the line color at certain areas of the plot. I use the OnBeforeDraw event of the WaveFormPlot class. If I am not mistaken I clipped the code to do the mulitcolor line thing from this forum (been a while).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the code below... You'll see that I have commented the use of the data generated by InverseMapDataPoints and have replaced the values used to create my Pen instance&amp;nbsp;with the values generated by a linq query that creates a DateTime array&amp;nbsp;(dates) by way of&amp;nbsp;DataConverter.Convert and the plot.GetXData values. The routine not shown here (SegmentRangeExists) simply checks if the plot has had a range defined where alt color is needed. The values returned from InverseMapDataPoints definitely displayed the same symptoms with regard to X value accuracy. My alternative method is as right as rain. My use of DataConverter along with GetXData would seem to indicate that DataConverter is performing fine (in this case anyway).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers... and GO WINGS!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;PRE&gt;&lt;P&gt;            using (Pen secondPen = new Pen(SecondColor))
            using (Pen normalPen = new Pen(this.LineColor))
            {
                // Iterate through the points and draw the lines one at a time with
                // the appropriate color depending on if it's increasing or decreasing.
                DateTime[] dates = (from dbl in this.GetXData() select (DateTime)DataConverter.Convert(dbl, typeof(DateTime))).ToArray();
                for (int i = 1; i &amp;lt; points.Length; i++)
                {
                    PointF point1 = points[i - 1];
                    PointF point2 = points[i];

                    if (System.Double.IsNaN(point1.Y) == false &amp;amp;&amp;amp; System.Double.IsNaN(point2.Y) == false)
                    {
                        double[] xdata = new double[2], ydata = new double[2];
                        //this.InverseMapDataPoints(e.Bounds, new PointF[] { point1, point2 }, out xdata, out ydata);

                        Pen pen = SegmentRangeExists(
                            true, dates[i - 1], dates[i]
                            //true, (DateTime)DataConverter.Convert(xdata[0], typeof(DateTime)),
                            //    (DateTime)DataConverter.Convert(xdata[1], typeof(DateTime))
                            ) 
                            ?
                            secondPen 
                            :
                            normalPen;

                        g.DrawLine(pen, point1, point2);
                    }
                }
            }

            // Cancel the event since we handled all drawing here.
            e.Cancel = true;
            
        }&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2009 00:27:18 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Measurement-Studio-for-NET/DateTime-XAxis-rounding/m-p/924135#M8721</guid>
      <dc:creator>jsytniak</dc:creator>
      <dc:date>2009-06-11T00:27:18Z</dc:date>
    </item>
  </channel>
</rss>

