stormpython / heatmap

Heatmap Plugin for Kibana 4
MIT License
55 stars 13 forks source link

Format legend numbers #21

Closed stormpython closed 8 years ago

stormpython commented 8 years ago

Closes #10.

Adds ability to format legend numbers.

The heatmap chart api for formating legend number is under the legendNumberFormat option.

The options are as follows:

1. "number" (default) - 12000 => 12k
2. "bytes" - 24000000 => 24MB
3. "percentage" - 10% => 10%
4. "currency" - 12.24 => $12.24

This uses numeral.js formatting. Specifically:

1. "number" = "0a"
2. "bytes" = "0b"
3. "percentage" = "0%"
4. "currency" = "($0.00a)"

screen shot 2016-04-06 at 11 46 43 am