Flotcharts, Excanvas and IE8: 'fillStyle' is null or not an object

876 views Asked by At

I am trying to use the Flot JavaScript plotting library (version 0.8.2) and excanvas.js to adapt it to IE8.

Calling $.plot(plotPlaceholder, data, options); I get the JS error 'fillStyle' is null or not an object on excanvas.js, line 230, character 5, which corresponds to a snippet:

function copyState(o1, o2) {
    o2.fillStyle = o1.fillStyle;
    ...
}

Here is my index.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<head>
<!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]-->
<script src="jquery-1.9.1.js" type="text/javascript" ></script>
<script src="jquery.flot.js" type="text/javascript" ></script>
<script>
    $(document).ready(function() {
        data = []
        data.push({data: [[63.62, 16.93]], label: 0, color: "red"});
        data.push({data: [[56.1, 13.11]], label: 1, color: "blue"});
        data.push({data: [[30, 13]], label: 2, color: "green"});

        var options = {};
        plotPlaceholder = ".results-container";
        var plot = $.plot(plotPlaceholder, data, options);
    });
</script>
</head>
    <body>
        <div class="plot-container">
            <div class="results-container" style="width: 600px; height: 300px; margin:auto;"></div>
        </div>
    </div>
</body>
0

There are 0 answers