templates.js.scenarios-chart.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cucumber-reporting Show documentation
Show all versions of cucumber-reporting Show documentation
Provides pretty html reports for Cucumber (Behaviour-Driven Development). It works by generating html from the
cucumber json report formatter. So can be used anywhere a json report is generated. Current use is in the
cucumber jenkins plugin and a maven mojo to generate the same report from mvn command line when running locally.
$(document).ready(function() {
var chartData = {
datasets: [{
data: [
$report_summary.getPassedScenarios(),
$report_summary.getFailedScenarios()
],
backgroundColor: [
"#00B000",
"#FF3030"
],
}],
labels: [
"Passed",
"Failed"
]
};
var ctx = document.getElementById("scenarios-chart");
window.myBar = new Chart(ctx, {
type: 'doughnut',
data: chartData,
options: {
title: {
display: true,
fontSize: 20,
text: 'Scenarios'
},
circumference: Math.PI,
rotation: Math.PI,
cutoutPercentage: 70,
responsive: true,
legend: {
display: false
}
}
});
}); © 2015 - 2025 Weber Informatics LLC | Privacy Policy