How about using HTML5 data attribute.
<h:form id="graphs">
<div id="graph" data-graph="#{myBean.selectedItem.graphData}">
</div>
</h:form>
then you could select data-graph
with jQuery, pass it to your chart drawing function and finally relounch drawCahrt()
with (if using Primefaces).
<h:selectManyCheckbox id="xxx" value="#{panelB.foo}">
....
<p:ajax oncomplete="drawChart();" process="@this" update=":graphs" />
</h:selectManyCheckbox>
Make sure you put you ajax scriptlet in a place that is being rerendered by your , and call drawChart() after update of HTML DOM based on ajax response.