The extension project was to display the data in a bar graph using the HTML5 <canvas> tag. I was able to get both working after some initial faffing about with forms and data retrieval. The bulk of my time was spent making a) a rainbow fill for a drawing object (not that hard), b) trying to draw triangles instead of rectangles (also not too hard) and c) trying to rearrange the triangles into a stellate pentagon (i.e. a star) which is far more difficult that I could manage. It's apparantly weird enough that not even StackOverflow has a solution. I have an idea of how to approach it, but it involves using the matrix transformation in HTML5...and it's been 20 years since linear algebra. I can even move the triangle using the transformation, but I don't sufficiently understand how the context and positioning work such that I can change locations systematically
Here's my rainbow triangle, anyway:
And here's the Dallas (temperature) forecast for the next 5 days:
Also, you should refresh the page after each search.
Finally, it doesn't handle large negative temperatures very well.
City:
No comments:
Post a Comment