有誰知道如何讓「y軸」值從0開始在Jqplot ....默認情況下它以負值開始,例如:-500,0 ,500,1000等....請幫助JQplot barRenderer「y軸」值從負值開始
回答
參見http://www.jqplot.com/docs/files/jqPlotOptions-txt.html
組y軸:{分鐘:0,最大:500,numberTicks:5}
集分鐘:對象(最小)設爲0:對象
$(document).ready(function(){
// your code here... //
axes:{
yaxis: {min:0}
}
})
正如rsapru建議的那樣,建議使用max:object(maximum)值將圖形綁定到您的首選範圍。例如,如果你想最低爲0,最高爲7500
axes:{
yaxis: {min:0, max: 7500}
}
如果你想通過與蜱指定蜱可指定您可以手動刻度線的刻度:對象或具有jqPlot計算滴答間距(在這種情況下不需要除最小和最大物體以外)或按特定的滴答數量(使用numberTicks:對象)
示例:對於間隔100單位,從0到1000,使用11蜱(0,100,200,300,400,500,600,700,800,900,1000)jqPlot自動計算:
axes:{
yaxis: {min:0, max: 1000, numberTicks: 11}
}
示例:對於蜱100個單位分開,從0到1000,使用11個蜱(0,100,200,300,400,500,600,700,800,900,1000)手冊規範:
axes:{
yaxis: {min:0, max: 1000, Ticks: [[0],[100],[200],[300],[400],[500],[600],[700],[800],[900],[1000]]}
}
你可以告訴任何方法來計算沒有滴答滴答,沒有明確地設置它,我的意思是,如果圖表正常創建,那麼我們可以得到圖中顯示的滴答否 – 2013-05-27 13:24:49
你能幫助這個one:http://stackoverflow.com/q/16771537/1283215 – 2013-05-27 13:25:53
你可能必須結合Nerds的技術的答案與PackedUp的答案迫使一個零y軸「realsies」,就像這樣:'軸:{yaxis:{min :0,pad:0}}' – 2014-02-03 20:16:47
var plot2 = $.jqplot ('chartdiv', getRequestStats(), {
// Give the plot a title.
title: 'Daily Request Status',
// You can specify options for all axes on the plot at once with
// the axesDefaults object. Here, we're using a canvas renderer
// to draw the axis label which allows rotated text.
axesDefaults: {
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
},
// An axes object holds options for all axes.
// Allowable axes are xaxis, x2axis, yaxis, y2axis, y3axis, ...
// Up to 9 y axes are supported.
axes: {
// options for each axis are specified in seperate option objects.
xaxis: {
label: "Hour",
// Turn off "padding". This will allow data point to lie on the
// edges of the grid. Default padding is 1.2 and will keep all
// points inside the bounds of the grid.
pad: 0
},
yaxis: {
label: "Count",
pad: 0
}
}
});
墊:0將星Y軸從0開始。
以下解決方案適用於我。
- >在數組中也添加零值。
- >設置數據渲染到$ .jqplot.CanvasAxisLabelRenderer
y軸:{ 渲染:$ .jqplot.CanvasAxisLabelRenderer .....
}
感謝 阿德南
在yaxis中添加yaxis:{min:0}
將以下內容添加到腳本中:
yaxis: {
minimum:0
}
在你的yaxis。我試了一下,它的工作原理。
- 1. 圖表js 2中如何從右側開始Y軸線爲負值?
- 2. 用jqplot在y軸上映射數值輸入值
- 3. ASP.NET圖表 - Y值不從0開始
- 4. PChart - Y軸不從0開始
- 5. SSRS使報告從負值開始
- 6. 如何將y軸的值僅顯示在jqplot中
- 7. X軸和Y軸從d3js的邊緣開始切割
- 8. jqplot從頂部開始繪製軸標記
- 9. JQPlot - 使y軸只有整數?
- 10. JQPlot Y軸標籤偏移量
- 11. jqplot y軸標籤不是垂直的
- 12. jqPlot造型 - 如何刪除Y軸線?
- 13. jqPlot座標軸上的重複值
- 14. xamarin核心圖y軸值
- 15. 增益蟒蛇y軸值
- 16. gnuplot的Y軸值(日期)
- 17. GGPLOT2提取Y軸值
- 18. Primefaces圖表+ jqplot擴展器 - 在擴展與jqplot選項y軸
- 19. 高座標軸定製的Y軸值
- 20. Highcharts - 負值,將y軸設置爲大於0?
- 21. 在y軸上隱藏刻度值是負的
- 22. Google可視化API:折線圖 - 在Y軸上隱藏負值
- 23. Excel圖表:將Y軸值轉換爲Y軸類別
- 24. 如何修改兩個X&Y在我的數據點軸系Jqplot圖表,從所包含的點開始
- 25. jQplot線圖從x = 0開始
- 26. 散點圖(makeing從零開始(倒置Y軸))
- 27. jqPlot「stacked」y-axis
- 28. 如何使mscharts的y軸始終爲特定值
- 29. Flex Chart - 更改y軸上的起始值
- 30. jqplot - x軸
謝謝大家:) – soniaP 2011-07-07 15:08:53