2013-07-18 25 views
1

在我的項目中使用Kendo UI Datawiz組件(線性測量儀)。它應該是深度的指標,其中表面位於0(頂部),底部應位於x(底部)。目前我還沒有想出如何「反轉」量規的方向,使其從0開始,並向下移動到x的底部。Kendo UI線性測量儀的反向

有誰知道如何做到這一點?

這裏是我的壓力錶:

 function createGauges() { 
      var value = $("#depthBar").val(); 

      $("#depthBar").kendoLinearGauge({ 
       pointer: { 
        value: 28, 
        shape: "arrow" 
       }, 

       scale: { 
        majorUnit: 20, 
        minorUnit: 2, 
        min: -40, 
        max: 60, 
        vertical: true, 
        directions: 


       } 
      }); 
     } 

     $(document).ready(function() { 
      createGauges(); 
     }); 

回答

2

AAAND,我已經找到了答案。其實錯過了文檔中的一小段代碼;

... 
    scale: { 
     majorUnit: 1000, 
     minorUnit: 500, 
     min: 0, 
     max: 12000, 
     vertical: true, 
     reverse: true 
    } 
...