There are two methods you can use for embedding charts to be responsive:
With jQuery:
<script type="text/javascript" src="./jquery/js/jquery.min.js"></script> <script type="text/javascript" src="/ibi_apps/tdg/jschart/distribution/tdgchart-min.js"></script> $(function () { $('#test_chart').tdgchart( {remoteDataURL: serverUrl + "/ibfs/WFC/Repository/OPM/test_autofit_chart.fex?COUNTRY=ENGLAND" } ); window.onresize = function() { $('#test_chart>div')[0].chart.width = $('#test_chart').width(); $('#test_chart>div')[0].chart.height = $('#test_chart').height(); $('#test_chart>div')[0].chart.redraw(); } });
Without jQuery:
<script type="text/javascript" src="/ibi_apps/tdg/jschart/distribution/tdgchart-min.js"></script> var chart = new tdgchart(); chart.width = container.clientWidth; chart.height = container.clienthHeight; chart.loadRemoteProperties('some_url_that_resolves_to_a_jschart_request', 'jschart', {onLoad: 'redraw'} ); window.onresize = function() { chart.width = container.clientWidth; chart.height = container.clientHeight; chart.redraw(); }
WebFOCUS | |
Feedback |