Reputation: 73
I'm finish a dynamic bar chart using d3, it's perfect work in google chrome.
However, it's not work in IE11.
here is my code
The problems are:
only work on drawing the background table, but the bar charts are not work. Here is the actual situation in IE My code run in IE
You can see that the first part, drawing the background are perfectly work in IE, however the barchart were missed and run without any error.
I use svg.polygon
to draw the star, and I divide draw stars code into two parts: first part I draw inside the table(over the bar chart), second part I draw outside the table, used to be legend.
The star in legend can print as usual, but all stars in table were missed and IE give the error code:
SVG4602: SVG Point list has incorrect format and could not be completely parsed.
Upvotes: 1
Views: 313
Reputation: 73
I solved my question.
The problem cause by the code
linear((new Date(d.collect_date) - starttime)/cal_hour+16)
In IE, it can't run the code new Date(d.collect_date)
because of some date setting( I guess)
So in this case, linear(...) this code won't return anythings, it finally not print out any bar chart.
So I have found the method to change the way to get date, and it success print the bar chars, and the stars in table is same problem.
So I change all get x location method into:
var temp_x = d.start.split(" ");
var temp_y = temp_x[0].split("-");
var temp_z = temp_x[1].split(":");
return linear((new Date(new Date(temp_y[0],(temp_y[1]-1),temp_y[2],temp_z[0],temp_z[1],temp_z[2])) - starttime)/cal_hour+16);
It's work on both chrome and IE
Upvotes: 2