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.58k stars 396 forks source link

Is Tick Length Variable? #204

Closed tomherold closed 4 years ago

tomherold commented 4 years ago

I looked at all the configuration options, but could not find a parameter that defines the length of the major tick marks. See my attached graphic where I wanted the grey ticks shorter.

test
mingganglee commented 4 years ago

Have you solved the problem? I would also like to try to make the scale smaller

Mikhus commented 4 years ago

Yes, it refer to "Fonts Customization Options" of the documentation https://canvas-gauges.com/documentation/user-guide/configuration

Hints:

cypis007 commented 4 years ago

Yes, it refer to "Fonts Customization Options" of the documentation https://canvas-gauges.com/documentation/user-guide/configuration

Hints:

  • fontNumbers: specifies font family for the tick numbers.
  • fontNumbersSize: Size of the font for tick numbers in relative units.

But how to change Tick length and width on Radial Gauge? So far all Radial Charts are having Major Tick Length = 2 x Minor Tick Length. How to define Major Tick length as 150% of Minor Tick length ? I would like to have result same as on scale below:

katyshin commented 3 years ago

The tick size parameters is very lacking to cover 90% of all tasks... And the arrangement of the text outside of gauge ( when data-numbers-marginis very negative value, the text by the margin is cut off).