--Ploty Examples-- Pie Chart of Job Statuses: let data = JobRunsTable | summarize Completed = countif(Status == "Completed"), Failed = countif(Status == "Failed"), Aborted = countif(Status == "Aborted"); data | extend TotalJobs = Completed + Failed + Aborted | extend ploty = strcat( '{"data":[{"type":"pie",', '"labels":["Completed","Failed","Aborted"],', '"values":[', tostring(Completed), ',', tostring(Failed), ',', tostring(Aborted), '],', '"marker":{"colors":["green","red","orange"]},', '"textinfo":"label+value",', '"hoverinfo":"label+value"}],', '"layout":{"title":"Job Status Distribution (', tostring(TotalJobs), ')",', '"showlegend":false}}' ) | project ploty Ink Consumption by Color (L) JobRunsTable | summarize Cyan = sum(OutputCyan), Magenta = sum(OutputMagenta), Yellow = sum(OutputYellow), Black = sum(OutputBlack), LightCyan = sum(OutputLightCyan), LightMagenta = sum(OutputLightMagenta), LightYellow = sum(OutputLightYellow), Blue = sum(OutputBlue), LightBlue = sum(OutputLightBlue), Orange = sum(OutputOrange), LightOrange = sum(OutputLightOrange), Rubine = sum(OutputRubine), LightRubine = sum(OutputLightRubine), Navy = sum(OutputNavy), Violet = sum(OutputViolet), Transparent = sum(OutputTransparent) | extend keys = pack_array("Cyan","Magenta","Yellow","Black","Light Cyan","Light Magenta","Light Yellow","Blue","Light Blue","Orange","Light Orange","Rubine","Light Rubine","Navy","Violet","Transparent") | extend values = pack_array( toreal(Cyan)/1000000000.0, toreal(Magenta)/1000000000.0, toreal(Yellow)/1000000000.0, toreal(Black)/1000000000.0, toreal(LightCyan)/1000000000.0, toreal(LightMagenta)/1000000000.0, toreal(LightYellow)/1000000000.0, toreal(Blue)/1000000000.0, toreal(LightBlue)/1000000000.0, toreal(Orange)/1000000000.0, toreal(LightOrange)/1000000000.0, toreal(Rubine)/1000000000.0, toreal(LightRubine)/1000000000.0, toreal(Navy)/1000000000.0, toreal(Violet)/1000000000.0, toreal(Transparent)/1000000000.0 ) | extend colors = pack_array("#00FFFF", "#FF00FF", "#FFFF00", "#000000", "#E0FFFF", "#FFB6C1", "#FFFFE0", "#0000FF", "#ADD8E6", "#FFA500", "#FFE4B5", "#D2042D", "#FF69B4", "#000080", "#8A2BE2", "#FFFFFF") | extend ploty = strcat( '{"data":[{"type":"bar",', '"x":', tostring(keys), ',', '"y":', tostring(values), ',', '"marker":{"color":', tostring(colors), '}', '}],', '"layout":{"title":"Ink Consumption by Color (L)","xaxis":{"title":"Color"},"yaxis":{"title":"Total Ink (L)"}}}' ) | project ploty Failing Machines (TOP 10): let data = JobRunsTable | where Status == "Failed" | summarize FailedCount = count() by SerialNumber, Site | top 10 by FailedCount desc | order by FailedCount desc | extend SerialNumberWithSite = strcat(SerialNumber, iif(isnull(Site), "", strcat(" (", Site, ")"))); let x = toscalar(data | summarize make_list(SerialNumberWithSite)); let y = toscalar(data | summarize make_list(FailedCount)); let colors = dynamic([ "#B30000", "#CC0000", "#E60000", "#FF0000", "#FF2A2A", "#FF3333", "#FF4D4D", "#FF6666", "#FF9999", "#FFCCCC" ]); print ploty = tostring(strcat( '{"data":[', '{"x":', tostring(x), ',"y":', tostring(y), ',"type":"bar",', '"marker":{"color":', tostring(colors), '}', '}],', '"layout":{"title":"",', '"xaxis":{"title":"Machine (Site)","automargin":true},', '"yaxis":{"title":"Failure Count"},', '"margin":{"b":150}}}' )) Resume Stats: let r1="Continuous request message 'JobRequest' had failed to provide a response for a period of 10 seconds and has timed out."; let r2="Transporter disconnected."; let ids_with_disconnect=JobRunsTable | where isnotempty(FailureReason) | where FailureReason endswith r1 or FailureReason endswith r2 | distinct ID; let latest_per_id=JobRunsTable | summarize arg_max(CreatedTime, *) by ID | extend LatestIsDisconnect=isnotempty(FailureReason) and (FailureReason endswith r1 or FailureReason endswith r2); let totals=latest_per_id | where ID in (ids_with_disconnect) | summarize Resumed=countif(not(LatestIsDisconnect)), NotResumed=countif(LatestIsDisconnect); totals | extend ["Job Runs Recovered By Resume"]=Resumed, ["Job Runs Could not Resume"]=NotResumed, ["Total Disconnections"]=Resumed+NotResumed, ["Success Rate"]=round(100.0*todouble(Resumed)/todouble(Resumed+NotResumed),2) | project-away Resumed, NotResumed | extend keys=pack_array("Job Runs Recovered By Resume","Job Runs Could not Resume","Total Disconnections","Success Rate"), values=pack_array(toreal(['Job Runs Recovered By Resume']),toreal(['Job Runs Could not Resume']),toreal(['Total Disconnections']),toreal(['Success Rate'])), colors=pack_array("#28a745","#dc3545","#6c757d","#007bff") | extend ploty=strcat('{"data":[{"type":"bar","x":', tostring(keys), ',"y":', tostring(values), ',"marker":{"color":', tostring(colors), '}}],"layout":{"title":"Job Resume Analysis","xaxis":{"title":""},"yaxis":{"title":"Value"},"showlegend":false}}') --Ploty Examples--