Atozed Forums

Full Version: Change Javascript Chart
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I use chartjs.org in my HTML template with variables

<script>
var cType="bar";
var xValues=["Item1","Item2","Item3"];
var yValues=[34,12,45];
....

</script>

I will with IWButton click change this variables and draw chart?

I tried with WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA('var cType = "line";'); and not work!

Maybe is any variant this implementation with RegisterCallBack for change my variables?
Try update your chart.
Code:
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA('var cType = "line"; yourchart.update();');