DevExtreme v26.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

Vue Gauges - Custom Layout

This demo shows how to adjust a relative position of the LinerGauge elements. The range container, value and subvalue indicators include the offset property that specifies a shift from the scale for this element. When this property is assigned to a positive value, the corresponding element moves down from its initial position. Otherwise, it moves up.

Backend API
<template> <div> <DxLinearGauge id="gauge" :value="value" :subvalues="subvalues" > <DxScale :start-value="0" :end-value="30" :tick-interval="5" > <DxTick color="#536878" /> <DxLabel :indent-from-tick="-3" /> </DxScale> <DxRangeContainer :offset="10" > <DxRange :start-value="0" :end-value="5" color="#92000A" /> <DxRange :start-value="5" :end-value="20" color="#E6E200" /> <DxRange :start-value="20" :end-value="30" color="#77DD77" /> </DxRangeContainer> <DxValueIndicator :offset="20" /> <DxSubvalueIndicator :offset="-15" /> <DxExport :enabled="true" /> <DxTitle text="Issues Closed (with Min and Max Expected)" > <DxFont :size="28" /> </DxTitle> </DxLinearGauge> </div> </template> <script setup lang="ts"> import { DxLinearGauge, DxScale, DxTick, DxLabel, DxRangeContainer, DxRange, DxValueIndicator, DxSubvalueIndicator, DxExport, DxTitle, DxFont, } from 'devextreme-vue/linear-gauge'; const subvalues = [5, 25]; const value = 17; </script> <style> #gauge { height: 440px; width: 100%; } </style>
import { createApp } from 'vue'; import App from './App.vue'; createApp(App).mount('#app');
<!DOCTYPE html> <html lang="en"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/26.1.5/css/dx.light.css" /> <link rel="stylesheet" type="text/css" href="./bundle.css" /> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="app"> </div> </div> <script src="bundles/vendor/vue.vendor.js"></script> <script src="./bundle.js"></script> </body> </html>