youcef92 / flotr

Automatically exported from code.google.com/p/flotr
0 stars 0 forks source link

Not working in Internet Explorer #154

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
i have a problem with my code.

i Firefox it works and in IE it doesn't.

the error is : 

Message: 'data[...]' is null or not an object
Line: 2
Char: 471
Code: 0
URI: http://www.theevilteddys.nl/invoice/assets/flotr/flotr-0.2.0-alpha.js

---
my code is :

        <script type="text/javascript">

            document.observe('dom:loaded', function(){

                var d1 = [[01, 125.00],[02, 490.00],[03, 633.00],[04, 740.00],[05, 238.00],[05, 238.00],[06, 110.00],[06, 110.00],[07, 87.50],[08, 0.00],[09, 0.00],[10, 568.00],[11, 413.00],[12, 0.00],];
                var d2 = [[01, 125.00],[02, 490.00],[03, 633.00],[04, 740.00],[05, 200.00],[05, 200.00],[06, 110.00],[06, 110.00],[07, 87.50],[08, 0.00],[09, 0.00],[10, 512.00],[11, 0.00],[12, 0.00],];
                var d3 = [[01, 25.00],[02, 0.00],[03, 0.00],[04, 0.00],[05, 0.00],[05, 0.00],[06, 0.00],[06, 0.00],[07, 0.00],[08, 0.00],[09, 0.00],[10, 10.00],[11, 0.00],[12, 0.00],];

                var f = Flotr.draw($('yearly_graph'),[ data:d1,label:'invoice total',lines: {show: true, fill: true},points: {show: true}},{data:d2,label:'invoice paid',lines: {show: true, fill: true},points: {show: true}},{data:d3,label:'invoice discount',lines: {show: true, fill: true},points: {show: true}}],{legend: {show: true,noColumns: 1,labelBoxBorderColor: '#ccc',container: 'legend_graph',position: 'ne',margin: 5,backgroundOpacity: 0.85},xaxis: {ticks: [[1,'Jan'],[2,'Feb'],[3,'Mar'],[4,'Apr'],[5,'May'],[6,'Jun'],[7,'Jul'],[8,'Aug'],[9,'Sep'],[10,'Oct'],[11,'Nov'],[12,'Dec']],min: 1,max: 12},shadowSize: 4});
            });
        </script>

Original issue reported on code.google.com by Jeroenvh...@gmail.com on 29 Nov 2010 at 1:15

GoogleCodeExporter commented 8 years ago
The problem is the extra comma at the end of your d1, d2 and d3 arrays. IE7 
doesn't handle it well.

Original comment by fabien.menager on 14 Dec 2010 at 7:12

GoogleCodeExporter commented 8 years ago
there is also a '{' missing before the 'data:d1,'

Original comment by dphiz...@gmail.com on 14 Dec 2010 at 7:21