veeno icon indicating copy to clipboard operation
veeno copied to clipboard

Format tooltip

Open quevlu opened this issue 4 years ago • 1 comments

Hello, is there a possibility to add a format function in the tooltip message?

quevlu avatar Jun 24 '20 20:06 quevlu

Stumbled with this for a while, I found a solution using the tooltips props.

For example:

Veeno(
  connect
  :tooltips="[{ to: (n) => n.toFixed(0) }, { to: (n) => n.toFixed(0) }]"
  :step="1"
  :options="{ start: yearRangeRaw, range: { min: 2400, max: (new Date()).getUTCFullYear() + 543 } }"
  :range="{ min: 2400, max: (new Date()).getUTCFullYear() + 543 }"
  @change="onYearRangeUpdate"
)

pixelart7 avatar Jun 30 '20 09:06 pixelart7