Hi,
I subscribed to CP-blocks plugin after reading a few times in the forums you mentioning that it is an easy solution to get a chart populated by Calculated Fields Form. Apparently, it is not as easy as I expected, so I was wondering if you can help.
Currently I have bar chart which get values from calculated fields, but it doesn’t update once I change the values.
What I lack is probably a single line of code which would force bar chart to react to any change.
My code is:
<canvas id="canvas1"></canvas>
<Script>
fbuilderjQuery(document).one('showHideDepEvent', function(){
var result = fbuilderjQuery('[id*="fieldname10_"]').val();
var national = fbuilderjQuery('[id*="fieldname2_"]').val()*fbuilderjQuery('[id*="fieldname11_"]').val()*0.5*52;
setBarChartBlock('canvas1', [{label: 'Title 1', value: result, color: '#FEBF18'},{label: 'Title 2', value: national, color: '#222222'}]);
});
</script>
Thanks in advance!
The page I need help with: [log in to see the link]