bliu5379 / PayPal-PowerBI-Custom-Visuals

2 stars 3 forks source link

decimal #4

Open MarchukNic opened 5 years ago

MarchukNic commented 5 years ago

Не хватает параметра, отображения количества знаков после запятой. Мне например не надо 2 знака (125.00%), мне хочется в данный момент видеть (125%). (125,3%) (67.094%) ты сам ставишь, какая точность нужна, либо берет параметр из самого элемента.

MarchukNic commented 5 years ago

пока вышел так из положения. В самом коде заменил строки До:

var text_width = context.measureText(n.toFixed(2)+"%").width; context.fillText(n.toFixed(2)+"%", center_x-text_width/2, center_y + font_size/2);

После: var text_width = context.measureText(n.toFixed(1)+"%").width; context.fillText(n.toFixed(1)+"%", center_x-text_width/2, center_y + font_size/2);

форматирование не работает что-то

RicardoMadaleno commented 4 years ago

Hi, this is an old comment; but i also have this issue... this visual would be even more awesome if you could add this feature to allow the users to control de decimal points thanks

redzstarkiss commented 3 years ago

Hi, this is an old comment; but i also have this issue... this visual would be even more awesome if you could add this feature to allow the users to control de decimal points thanks

I'm hoping for the same thing too..