PageSourceSearch

https://digitalcivics.io/assets/built/home-chart.js?v=3838b747c8

js digitalcivics.io collected 2026-09-26 11:11:15 UTC 3,190 bytes, 1 lines download raw bytes

1$(document).ready((()=>{0!=$("#home-chart").length&&(setupChartNavigationEventHandlers(),loadHomeChartsData())})),window.setActiveChart=t=>{let a=$("#home-chart--title");switch(t){case"publications":a.html("Academic<br>Publications"),initialiseHomeChart(window.publicationsData,"Publications");break;case"awards":a.html("Research<br>Awards"),initialiseHomeChart(window.awardsData,"Awards");break;case"students":a.html("Student<br>Researchers"),initialiseHomeChart(window.studentsData,"Students")}$(".stat-card").removeClass("active"),$("#"+t).addClass("active")},window.chartDataForPosts=t=>{let a={};return t.forEach((t=>{const e=t.tags.filter((t=>-1!==t.name.indexOf("#year-")));let i=null;if(0!=e.length){i=e[0].name.replaceAll("#year-","")}if(i){const t=void 0===a[i]?0:a[i];a[i]=t+1}})),a};const setupChartNavigationEventHandlers=()=>{$("#publications").click((()=>{window.setActiveChart("publications")})),$("#awards").click((()=>{window.setActiveChart("awards")})),$("#students").click((()=>{window.setActiveChart("students")}))},loadHomeChartsData=()=>{let t={limit:"all",include:"tags",fields:"slug",filter:"tag:hash-paper"};api.posts.browse(t).then((t=>{$("#publications--value").html(t.length),window.publicationsData=window.chartDataForPosts(t),window.setActiveChart("publications")})),t.filter="tag:hash-paper+tag:[hash-award-honorable-mention,hash-award-best-paper]",api.posts.browse(t).then((t=>{$("#awards--value").html(t.length),window.awardsData=window.chartDataForPosts(t)})),t.filter="tag:hash-student",api.posts.browse(t).then((t=>{$("#students--value").html(t.length),window.studentsData=window.chartDataForPosts(t)}))},initialiseHomeChart=async(t,a)=>{void 0!==window.activeChart&&window.activeChart.destroy();const e=$("#home-chart");if(void 0===e||!e)return;const i=Object.keys(t).sort();0!=t.length&&0!=i.length&&(window.activeChart=new Chart(e,{type:"line",data:{labels:i,datasets:[{label:a,data:t,borderWidth:3,hitRadius:60,borderColor:"#ffffff",pointBackgroun
1dColor:()=>{let t=Array(i.length);return t.fill("#ffffff"),t},pointBorderColor:()=>{let t=Array(i.length-1);return t.fill("#ffffff"),t.push("#ff2c3c"),t},pointHoverRadius:()=>{let t=Array(i.length-1);return t.fill(6),t.push(15),t},pointRadius:()=>{let t=Array(i.length-1);return t.fill(3),t.push(10),t},pointBorderWidth:()=>{let t=Array(i.length-1);return t.fill(0),t.push(3),t},pointHoverBorderWidth:()=>{let t=Array(i.length-1);return t.fill(0),t.push(5),t}}]},options:{layout:{padding:{top:0,bottom:50}},animation:{onComplete:()=>{},delay:t=>{let a=0;return"data"===t.type&&"default"===t.mode&&(a=300*t.dataIndex+100*t.datasetIndex),a}},responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{titleMarginBottom:0,bodySpacing:0,displayColors:!1,xAlign:"left",yAlign:"top",backgroundColor:"rgba(255,255,255,0.0)",bodyColor:"#ff2c3c",titleFont:{size:22,weight:"bold"},bodyFont:{size:14,weight:"bold"},callbacks:{labelColor:t=>({borderColor:"rgb(0, 0, 0, 0)",backgroundColor:"rgb(255, 0, 0)",borderRadius:5}),labelTextColor:t=>"#ffffff",label:t=>{let a=t.dataset.label||"";return a&&(a=t.parsed.y+" "+a),a}}}},scales:{x:{display:!1,beginAtZero:!0},y:{display:!1,beginAtZero:!0}}}}))};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.