![](/img/trans.png)
[英]How to set max and min limit of zoom for an ID of an element with JS or JQUERY?
[英]How to limit min and max zoom in chartIQ library
要設置最小縮放,可以設置ChartEngine.minimumZoomTicks字段。
http://documentation.chartiq.com/CIQ.ChartEngine.html#minimumZoomTicks
stxx.minimumZoomTicks=5; // when zoomed all the way in only 5 bars will show
恐怕沒有一個字段可以反映該縮小功能,但是您可以通過利用prepend注入功能以及將zoomOutSpeed設置為1來實現您要完成的任務。
http://documentation.chartiq.com/tutorial-使用%20the%20Injection%20API.html
http://documentation.chartiq.com/CIQ.ChartEngine.html#preferences%5B%60zoomOutSpeed%60%5D
var stxx = yourChartInstance;
stxx.preferences.zoomOutSpeed=1;
stxx.prepend("zoomOut", function() {
for(var chartName in stxx.charts){
var chart=stxx.charts[chartName];
chart.maxTicks=20; // this will set the maximum number of bars on the screen, along with zoomOutSpeed
}
});
如果您還有其他疑問,請直接發送電子郵件至support@chartiq.com與ChartIQ聯系。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.