Esto no es realmente valores de paso. Solo está llamando a una función cuando presiona un botón:
$(document).ready(function() {
$('form').on('submit', function(e) {
e.preventDefault(); // we don't want to submit the form
$('#piechart').each(function() { // only do this if the element is found
// clear the canvas
this.getContext('2d').clearRect(0, 0, this.width, this.height);
});
var angles = [
$('#angle1').val() || 0,
$('#angle2').val() || 0,
$('#angle3').val() || 0
];
piechart("piechart1", ["cyan", "yellow", "green"], angles);
});
});
val()
Obtiene el valor del input
elemento. Hacemos || 0
Para configurarlo 0
en caso de que el navegador no entienda type="number"
y nos envía una cadena vacía.