D3.js challenging - Level 1
This example visualizes daily temperature records in a calendar-style heatmap, with the x-axis representing years and the y-axis representing months. Each cell encodes temperature values through color, and the visualization includes axis labels, gridlines, and a legend for color mapping. Built with D3.js v7, it uses `d3.scaleTime` for both axes, `d3.axisBottom` and `d3.axisLeft` for ticks, and reads data from a CSV file. The code includes placeholder logic for rendering maximum and minimum temperatures and tooltip functionality, though those interactions are not fully implemented in the visible source.
AI-generated descriptionHere are the basic requirements:
In the matrix, x direction indicates the year and y direction indicates the month (you can switch them if you like). Each cell indicates the corresponding month of a specific year.
You need to visualize the maximum and minimum temperature by month in some way (e.g. you can use click to switch max or min temperature).
When hovering mouse on each cell, a tip should appear to show the date and the temperature value.
A legend is needed to show the mapping between colors and values.