There is a problem that the two versions of echats cannot be used in jsp

Environment overview:

The old version of echarts used by the old project needs to make a new homepage and require high-end atmosphere. . .

The old echarts can not be achieved, decided to use the new version.

Use process:

Search and replace the full text of the new version of js source code, the version used is echarts5, so replace echarts with echarts5;

problem appear:

There is no problem in the perfect integration of the html demo, but it cannot be displayed on the jsp, and only one reference can be commented out, otherwise another xxxx is not define will be reported;

solve:

After trying N ways to no avail, finally change the reference order, move the reference of the new version to the top, reference the new version first, and then reference the old version to solve the problem.

Possible Causes:

It is related to the jsp loading mechanism and echarts version. The easiest solution to such problems is to try to prepend the import line

 

 

Guess you like

Origin blog.csdn.net/qq_39879542/article/details/117411013