score:5

Accepted answer

Seems to me you need to convert them to numbers first because input elems have values as strings:

g311 = +$("#g311").val();
g312 = +$("#g312").val();
g321 = +$("#g321").val();
g322 = +$("#g322").val();

and you need to declare these above the chart.

prefixing + converts a string to number.


Related Query

More Query from same tag