JavaScript Draw

Invoke the refresh of the jqxDraw. Author: http://jqwidgets.com

by jqwidgets

HTML

<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<div id='jqxDraw' style="width:680px; height:200px;"></div>
<button id='refresh'>Refresh</button>

JavaScript

$('#jqxDraw').jqxDraw({
      renderEngine: 'HTML5'
  });
  var renderer = $('#jqxDraw').jqxDraw('getInstance');

  // params: x, y, width, height, attributes
  var rectElement = renderer.rect(0, 0, 200, 100, {
      stroke: '#777777',
      fill: 'transparent'
  });
  $("#refresh").jqxButton();
  $("#refresh").click(function () {
      renderer.refresh();
  });