The heat calendar widget shows a calendar with the days marked in different colors. These colors depend on the amount of data per day and a gradient scale that you can see below.
Methods
# setColorScale(scale)
Set a color scale. Currently it has to be an array of colors in d3. The first color is used for tables without data. The rest, to map from the minimum to the maximum value in a linear way.
Parameters:
Name | Type | Description |
---|---|---|
scale |
Array.<string>
|
Colors scale. |
- Default Value:
- ["#006837", "#1A9863", "#66BD63","#A6D96A", "#D9EF8B", "#FFFFBF","#FEE08B", "#FDAE61", "#F46D43","#D73027", "#A50026"]
# setDataOperation(dataOperation)
Apply an operation for data.
Allowed values are:
- arctag: Arctangent.
- log: Logarithm.
- none: No operation
Parameters:
Name | Type | Description |
---|---|---|
dataOperation |
string
|
Operation name. |
- Default Value:
- 'none'
# setDayLineColor(color)
Set a custom color of the internal lines of the calendar that delimit the days.
Parameters:
Name | Type | Description |
---|---|---|
color |
string
|
Color. |
- Default Value:
- '#555555'
# setDiscardMethod(discardMethod)
Method to discard maximums and minimums.
Methods allowed:
- stdDev: Standard deviation.
- 5percent: Percentile 5%-95%.
- 10percent: Percentile 10%-90%.
- 20percent: Percentile 20%-20%.
- none: None.
Parameters:
Name | Type | Description |
---|---|---|
discardMethod |
string
|
Method name. |
- Default Value:
- 'none'
# setDisplayDayLegend(bool)
Set visible days legend.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
- Default Value:
- false
# setDisplayMark(bool)
Set enable display marks.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
- Default Value:
- true
# setDisplayScale(bool)
Set display the scale
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
- Default Value:
- false
# setDisplaySelectors(bool)
Set visible the selectors.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
- Default Value:
- false
# setDisplayWeekDays(bool)
Shows the days of the week.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
- Default Value:
- false
# setEvent(str, func)
Attach an event handler function for one event to the widget.
Parameters:
Name | Type | Description |
---|---|---|
str |
string
|
Name of the event to listen. |
func |
function
|
Callback JavaScript function. |
# setLabelMargin(margin)
Set the margin for the label.
Parameters:
Name | Type | Description |
---|---|---|
margin |
number
|
Margin value. |
- Default Value:
- 35
# setLeftmargin(margin)
Set left margin to wrap the chart.
Parameters:
Name | Type | Description |
---|---|---|
margin |
number
|
Margin value. |
- Default Value:
- 12
# setLegendSelectorColor(color)
Set the color for the legend selector.
Parameters:
Name | Type | Description |
---|---|---|
color |
string
|
Color |
- Default Value:
- 'white'
# setLeyendMaxValColor(color)
Set the custom color for the legend maximun value.
Parameters:
Name | Type | Description |
---|---|---|
color |
string
|
Color. |
- Default Value:
- '#dddddd'
# setLeyendMinValColor(color)
Set the custom color for the legend minimun value.
Parameters:
Name | Type | Description |
---|---|---|
color |
Object
|
Color. |
- Default Value:
- '#dddddd'
# setMaxPercentil(percentil)
Set the maximun percentile score.
Parameters:
Name | Type | Description |
---|---|---|
percentil |
number
|
Percentil value. Value between 0 and 1. |
- Default Value:
- null
# setMaxPercentilColor(color)
Set the maximun percentile color.
Parameters:
Name | Type | Description |
---|---|---|
color |
string
|
Color. |
- Default Value:
- #BA55D3
# setMinPercentil(percentil)
Set the minimun percentile score.
Parameters:
Name | Type | Description |
---|---|---|
percentil |
number
|
Percentil value. Value between 0 and 1. |
- Default Value:
- null
# setMinPercentilColor(color)
Set the minimum percentile color.
Parameters:
Name | Type | Description |
---|---|---|
color |
string
|
Color. |
- Default Value:
- #87CEEB
# setMondayFirst(bool)
Set Monday as firts day of week.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
- Default Value:
- false
# setMonthLabelColor(color)
Set the date label color.
Parameters:
Name | Type | Description |
---|---|---|
color |
string
|
Color. |
- Default Value:
- 'none'
# setMonthLineColor(color)
Set a custom color of the internal lines of the calendar that delimit the months.
Parameters:
Name | Type | Description |
---|---|---|
color |
string
|
Color. |
- Default Value:
- '#eeeeee'
# setMoveDaysLabels(bool)
Allow to shift the days of the week.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
- Default Value:
- true
# setOpacity(opacity)
Set the opacity for colors.
Parameters:
Name | Type | Description |
---|---|---|
opacity |
number
|
Opacity. Number between 0 and 1. |
- Default Value:
- 1
# setScaleHeight(scale)
Set a custom scale height.
Parameters:
Name | Type | Description |
---|---|---|
scale |
number
|
Scale value. |
- Default Value:
- 15
# setScaleMargin(scale)
Set a custom margin for the scale.
Parameters:
Name | Type | Description |
---|---|---|
scale |
number
|
Scale value. |
- Default Value:
- 15
# setScaleSize(scale)
Set a custom scale size.
Parameters:
Name | Type | Description |
---|---|---|
scale |
Array.<number>
|
Scale size. |
- Default Value:
- [0.25, 0.75]
# setTimestampKey(timestampKey)
Set a custum timespamp key. The data should be ordered by this column.
Parameters:
Name | Type | Description |
---|---|---|
timestampKey |
string
|
Column name. |
# setToBytes(bool)
Set the values as units of bytes.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
- Default Value:
- false
# setTopmargin(margin)
Set the top margin of the chart.
Parameters:
Name | Type | Description |
---|---|---|
margin |
number
|
Margin value. |
- Default Value:
- 50
# setValue(value)
Set the value to show.
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
Column name. |
# setWeekDayFontColor(color)
Set the color for week days labels.
Parameters:
Name | Type | Description |
---|---|---|
color |
string
|
Color. |
- Default Value:
- '#ffffff'
# setWeekDaysLabels(days)
Set custom labels for days of weeks.
Parameters:
Name | Type | Description |
---|---|---|
days |
Array.<string>
|
Days of week labels. |
- Default Value:
- ['S', 'M', 'T', 'W', 'T', 'F', 'S']