Vega Viz - Displaying data in Bytes

(nyssa) #1

Goal : Need to display data in Bytes.

I am trying to use numeral.js on Kibana for a vega viz but am not able to get the data to display in bytes. This is the library and this is my signal

"signal": "if(cell_hover && cell_hover.datum.metric.value & > 0, format(cell_hover.datum.metric.value,'0.0b'), "")"

and its resulting in this

If there are any vega/js experts out there that can help me, i would very much appreciate it.

(Thomas Neirynck) #2

hi @nyssa

On first glance, doesn't it kind of do what it needs to? I believe the b type shows a binary-string, rounded to the nearest integer (I don't think decimal notation will work here).

(nyssa) #3

@thomasneirynck hmmmm you're right that makes sense, do you know what would be the format for bytes then?

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.