Mikhus / canvas-gauges

HTML5 Canvas Gauge. Tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas. No dependencies. Suitable for IoT devices because of minimum code base.
http://canvas-gauges.com/
MIT License
1.57k stars 396 forks source link

Valuebox too narrow #117

Closed softfoot closed 7 years ago

softfoot commented 7 years ago

Using the HTML below and a value of 1012 the box displayed is too narrow and the borders overlay the end digits. This was an issue with previous versions too.

I am using 2.1.2.

Regards, Dave

data-major-ticks="950, 960, 970, 980, 990, 1000, 1010, 1020, 1030, 1040, 1050"
data-type="radial-gauge"
data-title="Barometer"
data-units="mBar"
data-width="200"
data-height="200"
data-value-int="0"
data-value-dec="0"
data-width="200"
data-height="200"
data-value-int="0"
data-value-dec="0"
data-min-value="950"
data-max-value="1050"
data-highlights="false"
Mikhus commented 7 years ago

Sure, that is why you have an ability to specify yourself the required with of the value box, read here: https://canvas-gauges.com/documentation/user-guide/configuration#value-box-options

Please, take a look at the valueBoxWidth parameter

Regards, Mike

Mikhus commented 7 years ago

BTW it looks like a bug of auto-calculations for the box width, so, please, treat a previous comment as a workaround you can use to bypass those limits, but in the future versions it has to be fixed, so I keep this issue as a bug to fix.

And big thanks to your contributions! :)

softfoot commented 7 years ago

I already use the width parameter as a work around ... thought it worth reporting though since I couldn't see one in the bug list.

Best regards Dave

-- Sent from myMail for Android

Saturday, 11 March 2017, 11:39am +00:00 from Mykhailo Stadnyk notifications@github.commailto:notifications@github.com:

BTW it looks like a bug of auto-calculations for the box width, so, please, treat a previous comment as a workaround you can use to bypass those limits, but in the future versions it has to be fixed, so I keep this issue as a bug to fix.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Mikhus/canvas-gauges/issues/117#issuecomment-285861423, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AImk6A9L4tHUvrb0_P7gOuy66HqPrdsgks5rkofYgaJpZM4MaLW7.

Mikhus commented 7 years ago

Sure, thank you very much!

Fixed in branch v2.1.3