mirror of https://github.com/mum4k/termdash.git
Update comments
This commit is contained in:
parent
65debbb18f
commit
e5e6097bdf
|
@ -27,10 +27,10 @@ import (
|
|||
"github.com/mum4k/termdash/widgets/heatmap/internal/axes"
|
||||
)
|
||||
|
||||
// HeatMap draws heatmap charts.
|
||||
// HeatMap draws heat map charts.
|
||||
//
|
||||
// Heatmap consists of several cells. Each cell represents a value.
|
||||
// The larger the value, the darker the color of the cell (From white to black).
|
||||
// The larger the value, the darker the color of the cell (from white to black).
|
||||
//
|
||||
// The two dimensions of the values (cells) array are determined by the length of
|
||||
// the XLabels and YLabels arrays respectively.
|
||||
|
|
|
@ -53,12 +53,12 @@ func xLabels(yEnd image.Point, graphWidth int, stringLabels []string, cellWidth
|
|||
return nil, errors.New("not implemented")
|
||||
}
|
||||
|
||||
// paddedLabelLength calculates the length of the padded label and
|
||||
// paddedLabelLength calculates the length of the padded X label and
|
||||
// the column index corresponding to the label.
|
||||
// For example, the longest label's length is 5, like '12:34', and the cell's width is 3.
|
||||
// So in order to better display, every three cells will display a label,
|
||||
// the label belongs to the middle column of the three columns,
|
||||
// and the padded length is 3*3, which is 9.
|
||||
// For example, the longest X label's length is 5, like '12:34', and the cell's width is 3.
|
||||
// So in order to better display, every three columns of cells will display a X label,
|
||||
// the X label belongs to the middle column of the three columns,
|
||||
// and the padded length is 3*3 (cellWidth multiplies the number of columns), which is 9.
|
||||
func paddedLabelLength(graphWidth, longest, cellWidth int) (l, index int) {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
package heatmap
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/mum4k/termdash/cell"
|
||||
)
|
||||
|
||||
|
@ -36,7 +37,7 @@ type options struct {
|
|||
|
||||
// validate validates the provided options.
|
||||
func (o *options) validate() error {
|
||||
return nil
|
||||
return errors.New("not implemented")
|
||||
}
|
||||
|
||||
// newOptions returns a new options instance.
|
||||
|
|
Loading…
Reference in New Issue