<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communitytest.tessitura.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>RSUM continuous chart, remove gaps</title><link>https://communitytest.tessitura.com/topical_groups/analytics-coffee/w/wiki/814/rsum-continuous-chart-remove-gaps</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12 Non-Production</generator><item><title>RSUM continuous chart, remove gaps</title><link>https://communitytest.tessitura.com/topical_groups/analytics-coffee/w/wiki/814/rsum-continuous-chart-remove-gaps</link><pubDate>Mon, 01 Apr 2024 14:15:22 GMT</pubDate><guid isPermaLink="false">fd08b0f2-65fa-4b2b-916a-cce3e88b61d0:0be87191-0d64-405f-81b9-f806f6cbbb96</guid><dc:creator>Chris Wallingford</dc:creator><comments>https://communitytest.tessitura.com/topical_groups/analytics-coffee/w/wiki/814/rsum-continuous-chart-remove-gaps#comments</comments><description>Current Revision posted to Wiki by Chris Wallingford on 4/1/2024 2:15:22 PM&lt;br /&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;p&gt;This script will connect the data points surrounding a gap in the data. The drawback of this script is that it will draw a straight line between the two points, a tapered line over the missing series, making it possible to interpret that span of time as a regular increase over the series that have no values. In reality, repeating the previous non-null value over the series gaps that have no values would be more accurate, followed by a jump up to the next non-null value.&lt;/p&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;pre&gt;widget.on(&amp;quot;beforeviewloaded&amp;quot;,function(scope, args){&lt;br /&gt; args.options.plotOptions.series.connectNulls = true;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;widget.on(&amp;#39;render&amp;#39;, function(sender,se){&lt;br /&gt; for (var i = 0; i &amp;lt; sender.queryResult.series.length; i++ ) {&lt;br /&gt;  for (var j = 0; j &amp;lt; sender.queryResult.series[i].data.length; j++) {&lt;br /&gt;   sender.queryResult.series[i].data[j].marker.enabled = false;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;});&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;This script is an improvement in that the value over the gap between two data points is a repeat of the last non-null value, followed by a jump up to the next non-null value. However, this &lt;span&gt;formula doesn&amp;#39;t&amp;nbsp;differentiate between a future time period that can&amp;#39;t yet have&amp;nbsp;data, and a past time period that legitimately had no data. This results in the line continuing on to the end of the chart regardless of whether&amp;nbsp;those periods are in the past or future. We can probably figure out how to get the curve to stop at the final/last value, but that final/last value is still susceptible to being a past value that legitimately has no data and will fail to reflect that there has been&amp;nbsp;no data since&amp;nbsp;that past moment in time.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;widget.on(&amp;#39;processresult&amp;#39;, function(se, ev){&lt;br /&gt; $.each(ev.result.series, function(seriesIndex, seriesValue){&lt;br /&gt;  var prevValue = seriesValue.data[0].y;&lt;br /&gt;   $.each(seriesValue.data, function(index, value){&lt;br /&gt;    if(value.y == null)&lt;br /&gt;     value.y = prevValue;&lt;br /&gt;    else&lt;br /&gt;     prevValue = value.y; &lt;br /&gt;   });&lt;br /&gt; });&lt;br /&gt;});&lt;br /&gt; &lt;br /&gt;widget.on(&amp;#39;render&amp;#39;, function(sender,se){&lt;br /&gt; for (var i = 0; i &amp;lt; sender.queryResult.series.length; i++ ) {&lt;br /&gt;  for (var j = 0; j &amp;lt; sender.queryResult.series[i].data.length; j++) {&lt;br /&gt;   sender.queryResult.series[i].data[j].marker.enabled = false;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;});&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;How to apply it to the widget...&lt;/p&gt;
&lt;p&gt;&lt;a href="/topical_groups/analytics-coffee/w/wiki/807/analytics-scripts-not-saving"&gt;(+) Analytics Scripts not Saving - Wiki - analytic Coffee! - Tessitura Community&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Tessitura Analytics, script, Javascript&lt;/div&gt;
</description></item><item><title>RSUM continuous chart, remove gaps</title><link>https://communitytest.tessitura.com/topical_groups/analytics-coffee/w/wiki/814/rsum-continuous-chart-remove-gaps/revision/2</link><pubDate>Mon, 01 Apr 2024 14:14:42 GMT</pubDate><guid isPermaLink="false">fd08b0f2-65fa-4b2b-916a-cce3e88b61d0:0be87191-0d64-405f-81b9-f806f6cbbb96</guid><dc:creator>Chris Wallingford</dc:creator><comments>https://communitytest.tessitura.com/topical_groups/analytics-coffee/w/wiki/814/rsum-continuous-chart-remove-gaps#comments</comments><description>Revision 2 posted to Wiki by Chris Wallingford on 4/1/2024 2:14:42 PM&lt;br /&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;p&gt;This script will connect the data points surrounding a gap in the data. The drawback of this script is that it will draw a straight line between the two points, a tapered line over the missing series, making it possible to interpret that span of time as a regular increase over the series that have no values. In reality, repeating the previous non-null value over the series gaps that have no values would be more accurate, followed by a jump up to the next non-null value.&lt;/p&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;pre&gt;widget.on(&amp;quot;beforeviewloaded&amp;quot;,function(scope, args){&lt;br /&gt;args.options.plotOptions.series.connectNulls = true;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;widget.on(&amp;#39;render&amp;#39;, function(sender,se){&lt;br /&gt;for (var i = 0; i &amp;lt; sender.queryResult.series.length; i++ ) {&lt;br /&gt; for (var j = 0; j &amp;lt; sender.queryResult.series[i].data.length; j++) {&lt;br /&gt; sender.queryResult.series[i].data[j].marker.enabled = false;&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;)&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;This script is an improvement in that the value over the gap between two data points is a repeat of the last non-null value, followed by a jump up to the next non-null value. However, this &lt;span&gt;formula doesn&amp;#39;t&amp;nbsp;differentiate between a future time period that can&amp;#39;t yet have&amp;nbsp;data, and a past time period that legitimately had no data. This results in the line continuing on to the end of the chart regardless of whether&amp;nbsp;those periods are in the past or future. We can probably figure out how to get the curve to stop at the final/last value, but that final/last value is still susceptible to being a past value that legitimately has no data and will fail to reflect that there has been&amp;nbsp;no data since&amp;nbsp;that past moment in time.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;widget.on(&amp;#39;processresult&amp;#39;, function(se, ev){&lt;br /&gt; $.each(ev.result.series, function(seriesIndex, seriesValue){&lt;br /&gt;  var prevValue = seriesValue.data[0].y;&lt;br /&gt;   $.each(seriesValue.data, function(index, value){&lt;br /&gt;    if(value.y == null)&lt;br /&gt;     value.y = prevValue;&lt;br /&gt;    else&lt;br /&gt;     prevValue = value.y; &lt;br /&gt;   });&lt;br /&gt; });&lt;br /&gt;});&lt;br /&gt; &lt;br /&gt;widget.on(&amp;#39;render&amp;#39;, function(sender,se){&lt;br /&gt; for (var i = 0; i &amp;lt; sender.queryResult.series.length; i++ ) {&lt;br /&gt;  for (var j = 0; j &amp;lt; sender.queryResult.series[i].data.length; j++) {&lt;br /&gt;   sender.queryResult.series[i].data[j].marker.enabled = false;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;});&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;How to apply it to the widget...&lt;/p&gt;
&lt;p&gt;&lt;a href="/topical_groups/analytics-coffee/w/wiki/807/analytics-scripts-not-saving"&gt;(+) Analytics Scripts not Saving - Wiki - analytic Coffee! - Tessitura Community&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Tessitura Analytics, script, Javascript&lt;/div&gt;
</description></item><item><title>RSUM continuous chart, remove gaps</title><link>https://communitytest.tessitura.com/topical_groups/analytics-coffee/w/wiki/814/rsum-continuous-chart-remove-gaps/revision/1</link><pubDate>Fri, 29 Mar 2024 13:57:40 GMT</pubDate><guid isPermaLink="false">fd08b0f2-65fa-4b2b-916a-cce3e88b61d0:0be87191-0d64-405f-81b9-f806f6cbbb96</guid><dc:creator>Chris Wallingford</dc:creator><comments>https://communitytest.tessitura.com/topical_groups/analytics-coffee/w/wiki/814/rsum-continuous-chart-remove-gaps#comments</comments><description>Revision 1 posted to Wiki by Chris Wallingford on 3/29/2024 1:57:40 PM&lt;br /&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;pre&gt;widget.on(&amp;#39;processresult&amp;#39;, function(se, ev){&lt;br /&gt; $.each(ev.result.series, function(seriesIndex, seriesValue){&lt;br /&gt;  var prevValue = seriesValue.data[0].y;&lt;br /&gt;   $.each(seriesValue.data, function(index, value){&lt;br /&gt;    if(value.y == null)&lt;br /&gt;     value.y = prevValue;&lt;br /&gt;    else&lt;br /&gt;     prevValue = value.y; &lt;br /&gt;   });&lt;br /&gt; });&lt;br /&gt;});&lt;br /&gt; &lt;br /&gt;widget.on(&amp;#39;render&amp;#39;, function(sender,se){&lt;br /&gt; for (var i = 0; i &amp;lt; sender.queryResult.series.length; i++ ) {&lt;br /&gt;  for (var j = 0; j &amp;lt; sender.queryResult.series[i].data.length; j++) {&lt;br /&gt;   sender.queryResult.series[i].data[j].marker.enabled = false;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;});&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;How to apply it to the widget...&lt;/p&gt;
&lt;p&gt;&lt;a href="/topical_groups/analytics-coffee/w/wiki/807/analytics-scripts-not-saving"&gt;(+) Analytics Scripts not Saving - Wiki - analytic Coffee! - Tessitura Community&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Tessitura Analytics, script, Javascript&lt;/div&gt;
</description></item></channel></rss>