Last Updated: 26 Feb 2019 06:47 by ADMIN
Created on: 19 Feb 2019 07:59
Category: Gauge
Type: Feature Request
Auto scaling RadLinearGauge bar width for different screen resolution

The scenario is the same web-page should render perfectly on all kind of devices(mobile, tablet, desktop, laptop, projector, and high-resolution TV etc.)

The Bar width is set using Size property for Minor tick. The Pointer Width is set using Size property of Pointer.

Now that the sizes for bar and pointers are fixed, we cannot change it with changing screen resolution.

SVG has the property for scaling itself based on the design size and actual size on the client (ViewPort Size).

If something like design width and design height property is added, it will be really helpful to scale the same control and use it on all kind of devices with resolutions ranging from 320 x 180 to 4K UHD displays.


Marin Bratanov
Posted on: 26 Feb 2019 06:47
Hi Kasim,

You can change the values server properties by detecting the screen size on the server through RadDeviceDetectionFramework:

Another approach is to use the setOptions() method of the Kendo Gauge widget that powers RadLinearGauge and RadRadialGauge and set the desired settings on the client: This can include events like Sys.Application.Load, window.resize or any other project logic. Note that you may need to also call resize() or redraw() to have sizes and new properties to take effect.

The properties that control the gauge appearance pertain mostly to design and as such, are defined by the application developer. The gauge cannot arbitrarily change them because this can change the design required by the developer. Even if the developer wants a change to happen, the gauge cannot know what that change is in order to guess correctly. This is why the developer can apply modifications through the widget's API if/when/as needed.

Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Posted on: 19 Feb 2019 08:07
When screen resolution is other than the one on which the initial design was done, the gauge looks really bad.