Chartjs-How to resize chartjs in bootstrap columns for different browsers

0๐Ÿ‘

I found the answer by determinig which browser is in use.
so,

var isIEBrowser = true;

if ((navigator.userAgent.indexOf("MSIE") != -1) || (!!document.documentMode == true))
{
    isIEBrowser = true;
}
else
{
    isIEBrowser = false;
}

and where I build my charts

options:
{
    responsive: isIEBrowser,
    maintainAspectRatio: isIEBrowser,

and ensured the bootstrap columns which are the parent of the Canvas are set with

style='position: relative; height:99%; width:99%;'

0๐Ÿ‘

I found the answer by determinig which browser is in use.

if ((navigator.userAgent.indexOf("MSIE") != -1) || (!!document.documentMode == true))
    {
        isIEBrowser = true;
    }
    else
    {
        isIEBrowser = false;
    }

so where I build my charts

options:
{
    responsive: isIEBrowser,
    maintainAspectRatio: true,

Leave a comment