Releases: wa0x6e/cal-heatmap
Increase d3 version dependency
3.3.4 Increase d3 version dependency
Add tooltip
Enable tooltip on date hover by setting tooltip
to true
, on init()
.
Dynamic legend colors and more navigation options
The 3.3.0 release offers more control on the legend settings and domain scrolling.
Legend
Legend can now be added or removed after initialization.
In addition, all legend settings can be edited dynamically.
Check the legend playground in the documentation.
- A new
legendColors
setting was added to generate the heatmap colors dynamically, by interpolating a min and max colors. - Legend can now be rotated (90 deg only).
Domain scrolling
next()
and previous()
methods now takes an optional argument, specifying the number of domains to scroll.
A new jumpTo(date)
is available, in case you want to jump directly to a specific date.
Layout
rowLimit
and colLimit
setting has been added, to control the rows and columns number in a domain. Only use one, colLimit
will always take precedence over rowLimit
if both are present.
Changelog
- [new] Add
jumpTo()
method to scroll the calendar to the specified date - [new]
setLegend()
will redraw the legend if some of its settings (cellSize/padding, position, etc ...) were changed - [new] Add
legendColors
setting, to dynamically control the heatmap colors - [new] Add
showLegend()
andremoveLegend()
methods - [new]
next()
andprevious()
now takes an argument, to scroll multiple domains at once - [new] Add
legendOrientation
setting - [new] Add
rowLimit
andcolLimit
setting to control the number of columns and rows in a domain - [fix] Fix #37: two days get summed
- [change] All invalid data (not a number) will be ignored
- [change]
setLegend()
now takes a legend threshold array as first argument, and a color array as second argument
Fix #35
New setLegend() method
Add setLegend()
method to redefine legend threshold and other bugfixes
More control on domain label
Add setting to not paint domain label, and control its height
new Update() method
Add update()
method to update calendar's data.
update takes 3 arguments :
- data
- afterLoad
- updateMethod
update() can update the calendar in 3 different ways :
- reload the entire calendar with a new set of data
- replace a set of dates by their new values
- increment a set of dates by their new values
Check the documentation for usage.
New considerMissingDataAsZero option
The considerMissingDataAsZero
is used when you want the dates that are not associated to any values to behave like if they're associated to the value 0.
Useful when your API is not returning data for dates with value 0, to save space.
Domain navigation limit
New minDate
and maxDate
option to limit domain navigation.
These new options are accompanied by the onMinDomainReached
and onMaxDomainReached
events, triggered when the loaded domain is the upper/lower bound domain.
Minor bugfixes
- [fix] Fix domain month class (m_x) beginning at m_0 insted of m_1
- [new] Add new domain class: dy_x for the day of the week