analytic Coffee!
  • Topical Tessitura Community Groups
  • More
analytic Coffee!
Wiki Joining Isolated Data-points, Removing Data Markers, Interpolating Last Point
  • Discussions
  • Files
  • Wiki
  • Members
  • Mentions
  • Tags
  • Events
  • More
  • Cancel
  • New
analytic Coffee! requires membership for participation - click to join
  • analytic Coffee! Wiki
  • +Tessitura Analytics Shared Dashboards
  • +Data Analysis Training Opportunities
  • -Analytics Tips & Trouble shooting
    • Analytics Scripts not Saving
    • Auto-Zoom Scatter Map
    • Changing Labels on a Graph
    • Conditionally format the color of text
    • First Time Buyers and Subsequent Buying
    • Fixing Tessitura Analytic Emails after an upgrade
    • Joining Isolated Data-points, Removing Data Markers, Interpolating Last Point
    • Milestones: Labelled Data Points on Analytics Charts
    • RSUM continuous chart, remove gaps
    • Scatter Map Widget tips - Heat Map of postal codes
    • Sorting First Performance Name by Date Instead of Alphabetically
    • Troubleshoot Data Warehouse Load
    • Troubleshooting Application Availability
  • Jupyter Notebooks
  • Learning about AI
  • +Learning about Python
  • +Power BI & Tessitura

You are currently reviewing an older revision of this page.

  • History View current version

Joining Isolated Data-points, Removing Data Markers, Interpolating Last Point

From Chris Wallingford
https://community.tessituranetwork.com/tessitura_software_forums/f/tessitura_shared_reports-9/29770/data-markers-appearing-when-turned-off

JOINING THE DOTS

Points on the original line that are isolated, single data-points not immediately preceded or followed by another non-null data-point of the x-axis, [can be linked but] a marker dot will still be rendered on the line chart:

widget.on("beforeviewloaded",function(scope, args){
args.options.plotOptions.series.connectNulls = true;
});

REMOVING THE MARKERS

Expanding this script, we can iterate through all series lines, and all data points on each line to explicitly remove the marker dots. This will remove the markers as shown below, however, any series with only one data-point in the whole widget will disappear from the chart altogether. This may be a non-issue in your data however.

widget.on("beforeviewloaded",function(scope, args){
args.options.plotOptions.series.connectNulls = true;
});
     
widget.on('render', function(sender,se){
for (var i = 0; i < sender.queryResult.series.length; i++ ) {
    for (var j = 0; j < sender.queryResult.series[i].data.length; j++) {
        sender.queryResult.series[i].data[j].marker.enabled = false;
         }
    }
}
)

INTERPOLATING LAST POINT

Joining two points where there is a gap of multiple days might not be accurate.  On a daily sales graph, if you sold tickets in Feb 3rd and then again in Feb 10th you might not want to draw a straight line between those points indicating sales though our the quiet week.  A more accurate option might be to infer that the ticket sales amount stays the same from Feb 3rd to Feb 9th before increasing on Feb 10th.

Chris gives the answer here https://community.tessituranetwork.com/tessitura_software_forums/f/tessitura_shared_reports-9/29770/data-markers-appearing-when-turned-off/82722#82722

Please update the panelName variable with the exact name of the value in your widget. In my widget I'd named my value "RSUM Total Ticket Count".

widget.on('processresult', function(se, ev){
     
    var panelName = 'RSUM Total Ticket Count'
     
    var series = ev.result.series.find(el => el.name == panelName)
    var prevValue = series.data[0].y
     
    $.each(series.data, function(index, value){
        if(value.y == null)
            value.y = prevValue
        else
            prevValue = value.y;
    })
     
})
      
widget.on('render', function(sender,se){
for (var i = 0; i < sender.queryResult.series.length; i++ ) {
    for (var j = 0; j < sender.queryResult.series[i].data.length; j++) {
        sender.queryResult.series[i].data[j].marker.enabled = false;
         }
    }
}
)