User Interaction in ASP.NET Core Linear Gauge

18 Nov 20181 minute to read

Tooltip

Linear Gauge displays the details about a pointer value through e-lineargauge-tooltip, when the mouse hovers over the pointer. To enable the tooltip, set Enable property as true.

Linear Gauge with tooltip

Tooltip format

Tooltip in the Linear Gauge control can be formatted using the Format property in e-lineargauge-tooltip. It is used to render the tooltip in certain format or to add a user-defined unit in the tooltip. By default, the tooltip shows the pointer value only. In addition to that, more information can be added in the tooltip. For example, the format {value}km shows pointer value with kilometer unit in the tooltip.

Linear Gauge with tooltip format

Tooltip Template

The HTML element can be rendered in the tooltip of the Linear Gauge using the Template property in e-lineargauge-tooltip. The ${value} can be used as placeholders in the HTML element to display the pointer values of the corresponding axis.

Linear Gauge with tooltip template

Customize the appearance of the tooltip

The tooltip can be customized using the following properties in e-lineargauge-tooltip.

  • Fill - To fill the color for tooltip.
  • EnableAnimtion - To enable or disable the tooltip animation.
  • Border - To set the border color and width of the tooltip.
  • TextStyle - To customize the style of the text in tooltip.
  • ShowAtMousePosition - To show the tooltip at the mouse position.

Linear Gauge with tooltip customization

Positioning the tooltip

The tooltip is positioned at the End of the pointer. To change the position of the tooltip at the start, or center of the pointer, set the Position property to Start or Center.

Linear Gauge with tooltip position

Pointer Drag

To drag either marker or bar pointer to the desired axis value, set the EnableDrag property as true in e-lineargauge-pointer.

Linear Gauge with pointer drag