Article From:

1,I want to draw a picture like this:

With coordinates, the data of each coordinate point are as follows:
[x(Abscissa), y (ordinate), weight (weight)]
Different weights, different colors, the higher the weight, the brighter the color, if the weight is 0, is blue. The color of the picture will change gradually.

2,I looked at the scatter plot of echarts and felt that echarts could not satisfy the demand completely. The main reasons are as follows: the general idea of drawing scatter plots by echarts is to give the coordinate range and the coordinate points to be drawn, and then draw points on the coordinates to be drawn. If there are only a series of numbersAccording to this series, there is only one color. I only have a series of data, so the effect of color gradation is more difficult to achieve.

(1)Is there any other canvas or other JS drawing plug-in in front end to fulfill my needs?
(2)If not, my other idea is to use canvas to draw a coordinate system (82×82), the picture is generated by the back end, and then use canvas to draw the back end picture into the coordinate system. But drawing the coordinate system seems to be more troublesome. Is there a better library to implement? (urgency of project)Feel sorry for writing JS yourself.

Answer 0:

Mainly the mapping of weights and colors. This corresponds well, canvas hand animation is OK.

Leave a Reply

Your email address will not be published. Required fields are marked *