2016-03-07 145 views
1

是否可以在敏锐的仪表板图表上设置Y轴上的最大值和最小值?Keen.io仪表板图表上的最大和最小Y轴值

我下载仪表板从该GitHub库:

https://github.com/keen/dashboards

我有一个垂直列图表像下面,我想设置在y轴的最小值为70,最大到是90,我该怎么做?

<div class="col-sm-8"> 
    <div class="chart-wrapper"> 
     <div class="chart-title"> 
     Alex Weight (kg) 
     </div> 
     <div class="chart-stage"> 
     <div id="chart-01"></div> 
     </div> 
     <div class="chart-notes"> 
     </div> 
    </div> 
    </div> 


var query = new Keen.Query("maximum", { 
    eventCollection: "weight", 
    interval: "daily", 
    targetProperty: "value", 
    timeframe: "this_14_days", 
    timezone: "Australia/Sydney" 
}); 

client.draw(
query, document.getElementById("chart-01"), { 
    height: 150, 
width: '100%', 
chartType: 'columnchart', 

hAxis: { 
    format:'d MMM' 
} 
} 
); 

回答

1

当我问这个问题,我看着办吧...... 只需添加以下vAxis值:

var query = new Keen.Query("maximum", { 
eventCollection: "weight", 
interval: "daily", 
targetProperty: "value", 
timeframe: "this_14_days", 
timezone: "Australia/Sydney" 
}); 

client.draw(
query, document.getElementById("chart-01"), { 
height: 150, 
width: '100%', 
chartType: 'columnchart', 

hAxis: { 
    format:'d MMM' 
}, 
vAxis: { 
    minValue: 70, 
    maxValue: 80 
} 
} 
); 
相关问题