Problem
Getjson Submit return data is normal, in the incoming parameters are serialized, render the report times wrong Option.data.length < 1.
Analysis
1. Possible situation one:
.
But it is Getjson () to put the rendering in the success callback function, so obviously not this error
2. Possible scenario Two:
The serialized data is not fetched to NULL, so hint option.data.length<1
Reason:
When serializing the horizontal axis data, the horizontal axis is initialized by a switch (type) based on the different types, but the type 0 passed in is a string type and the type in switch (type) is numeric so it does not match the initialization data bit null
types=type; types=parsesint (type); Switch(types) { Case0:// Dayvar strdate= Date.getmonth () + 1 + "/" +date.getdate (); Xaxis.push (strdate); Break; Case1://Weekvar strdate = date.getmonth () + 1 + "/" +date.getdate (); Xaxis.push (strdate); Break; Case5 |//Customvar strdate = date.getmonth () + 1 + "/" +date.getdate (); Xaxis.push (strdate); Break; default : Break; }
Your mother pit me an afternoon, the procedure is the procedure, cannot go through must have the problem, so still want to calm down to analyze the reason, one step at a pace
parseint (type) converted to numeric type
Echart. JS Plugin rendering error data.length<1?