Skip to content

Dynamic legend colors and more navigation options

Compare
Choose a tag to compare
@wa0x6e wa0x6e released this 08 Oct 02:00
· 1055 commits to master since this release

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() and removeLegend() methods
  • [new] next() and previous() now takes an argument, to scroll multiple domains at once
  • [new] Add legendOrientation setting
  • [new] Add rowLimit and colLimit 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