0

I could not do that when put in a value being placed on the input attribute "data-value" here is my attempt:

$('.enviar').on('click', function(){
    var bla = $('input').val();
    $("#canPIE").data("values", bla);
});

jsfiddle

0

1 Answer 1

1

Have a look at this Fiddle

$('.enviar').on('click', function(){

var bla = $('input').val();


  $("#canPie").attr("data-values", $("#canPie").attr("data-values") + "," + bla);


  drawPieChart('canPie');

});
Sign up to request clarification or add additional context in comments.

1 Comment

@PatrickQ check the fiddle with the question. After going through it, I assumed that this is what the user is looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.