jquery用jqplot外掛畫圖例子
$.jqplot.config.enablePlugins = true;
l1 = [2, 3, 1, 4, 3];
l2 = [1, 4, 3, 2, 5];
line1=[['2008-09-30', 4], ['2008-10-30', 6.5], ['2008-11-30', 5.7], ['2008-12-30', 9], ['2009-01-30', 8.2]];
line2=[['2008-09-30', 3], ['2008-10-30', 5.5], ['2008-11-30', 5.7], ['2008-12-30', 10], ['2009-01-30', 9.2]];
plot2 = $.jqplot('chart2', [line1,line2], {
title:'Rotated Axis Text',
axes:{
xaxis:{
renderer:$.jqplot.DateAxisRenderer,
min:'August 30, 2008',
tickInterval:'1 month',
rendererOptions:{
tickRenderer:$.jqplot.CanvasAxisTickRenderer},
tickOptions:{formatString:'%b %#d, %Y', fontSize:'10pt', fontFamily:'Tahoma', angle:-40, fontWeight:'normal', fontStretch:1}
}
},
series:[{lineWidth:4, markerOptions:{style:'square'}}]
});
line1 = [[4, 1], [4, 2], [3, 3], [16, 4]];
line2 = [[3, 1], [7, 2], [4, 3], [3.125, 4]];
plot3 = $.jqplot('chart3', [line1, line2], {
//stackSeries: true,
legend: {
show: true,
location: 'se'
},
title: '條形圖',
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barDirection: 'horizontal',
barPadding: 6,
barMargin: 10
}
},
series: [{
label: '1st Qtr'
},
{
label: '2nd Qtr'
}],
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ['Q1', 'Q2', 'Q3', 'Q4']
},
xaxis: {min: 0, max: 20, numberTicks:5}
}
});
line1 = [[4, 1], [4, 2], [3, 3], [16, 4]];
line2 = [[3, 1], [7, 2], [4, 3], [3.125, 4]];
plot3 = $.jqplot('chart3d', [line1, line2], {
stackSeries: true,
legend: {
show: true,
location: 'se'
},
title: '條形圖',
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barDirection: 'horizontal',
barPadding: 6,
barMargin: 40
}
},
series: [{
label: '1st Qtr'
},
{
label: '2nd Qtr'
}],
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ['Q1', 'Q2', 'Q3', 'Q4']
},
xaxis: {min: 0, max: 20, numberTicks:5}
}
});
line1 = [4, 2, 9, 16];
line2 = [3, 7, 6.25, 3.125];
plot3b = $.jqplot('chart3b', [line1, line2], {
stackSeries: true,
legend: {
show: true,
location: 'nw'
},
title: '柱狀圖1',
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barPadding: 6,
barMargin: 40
}
},
series: [{
label: '1st Qtr'
},
{
label: '2nd Qtr'
}],
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ['Q1', 'Q2', 'Q3', 'Q4']
},
yaxis: {min: 0, max: 20, numberTicks:5}
}
});
line1 = [4, 2, 9, 16];
line2 = [3, 7, 6.25, 3.125];
plot3c = $.jqplot('chart3c', [line1, line2], {
legend: {
show: true,
location: 'nw'
},
title: '柱狀圖2',
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barPadding: 6,
barMargin: 20
}
},
series: [{
label: '1st Qtr'
},
{
label: '2nd Qtr'
}],
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ['Q1', 'Q2', 'Q3', 'Q4']
},
yaxis: {min: 0, max: 20, numberTicks:5}
}
});
//
line1 = [['item1', 3], ['item2', 7], ['item3', 2.5], ['item4', 6], ['item5', 5], ['item6', 4]];
line2 = [3, 7, 2.5, 6, 5, 4];
plot4 = $.jqplot('chart4', [line1], {
title: '餅圖1',
seriesDefaults:{renderer:$.jqplot.PieRenderer},
legend:{show:true}
});
line1 = [['item1', 3], ['item2', 7], ['item3', 2.5], ['item4', 6], ['item5', 5], ['item6', 4]];
line2 = [3, 7, 2.5, 6, 5, 4];
plot4 = $.jqplot('chart4b', [line1], {
title: '餅圖2',
seriesDefaults:{renderer:$.jqplot.PieRenderer, rendererOptions:{sliceMargin:4}},
legend:{show:true}
});
l1 = [2.2, 3, .6, 4.8, 3];
l2 = [1, 4, 3, 2, 5.7];
l3 = [1, 5, 6, 7, 5.7];
plot5 = $.jqplot('chart5', [l1, l2,l3]);
l1 = [2, 3, 1, 4, 3];
l2 = [1, 4, 3, 2, 5];
line1=[['2008-09-30', 4], ['2008-10-30', 6.5], ['2008-11-30', 5.7], ['2008-12-30', 9], ['2009-01-30', 8.2]];
line2=[['2008-09-30', 3], ['2008-10-30', 5.5], ['2008-11-30', 5.7], ['2008-12-30', 10], ['2009-01-30', 9.2]];
plot2 = $.jqplot('chart2', [line1,line2], {
title:'Rotated Axis Text',
axes:{
xaxis:{
renderer:$.jqplot.DateAxisRenderer,
min:'August 30, 2008',
tickInterval:'1 month',
rendererOptions:{
tickRenderer:$.jqplot.CanvasAxisTickRenderer},
tickOptions:{formatString:'%b %#d, %Y', fontSize:'10pt', fontFamily:'Tahoma', angle:-40, fontWeight:'normal', fontStretch:1}
}
},
series:[{lineWidth:4, markerOptions:{style:'square'}}]
});
line1 = [[4, 1], [4, 2], [3, 3], [16, 4]];
line2 = [[3, 1], [7, 2], [4, 3], [3.125, 4]];
plot3 = $.jqplot('chart3', [line1, line2], {
//stackSeries: true,
legend: {
show: true,
location: 'se'
},
title: '條形圖',
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barDirection: 'horizontal',
barPadding: 6,
barMargin: 10
}
},
series: [{
label: '1st Qtr'
},
{
label: '2nd Qtr'
}],
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ['Q1', 'Q2', 'Q3', 'Q4']
},
xaxis: {min: 0, max: 20, numberTicks:5}
}
});
line1 = [[4, 1], [4, 2], [3, 3], [16, 4]];
line2 = [[3, 1], [7, 2], [4, 3], [3.125, 4]];
plot3 = $.jqplot('chart3d', [line1, line2], {
stackSeries: true,
legend: {
show: true,
location: 'se'
},
title: '條形圖',
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barDirection: 'horizontal',
barPadding: 6,
barMargin: 40
}
},
series: [{
label: '1st Qtr'
},
{
label: '2nd Qtr'
}],
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ['Q1', 'Q2', 'Q3', 'Q4']
},
xaxis: {min: 0, max: 20, numberTicks:5}
}
});
line1 = [4, 2, 9, 16];
line2 = [3, 7, 6.25, 3.125];
plot3b = $.jqplot('chart3b', [line1, line2], {
stackSeries: true,
legend: {
show: true,
location: 'nw'
},
title: '柱狀圖1',
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barPadding: 6,
barMargin: 40
}
},
series: [{
label: '1st Qtr'
},
{
label: '2nd Qtr'
}],
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ['Q1', 'Q2', 'Q3', 'Q4']
},
yaxis: {min: 0, max: 20, numberTicks:5}
}
});
line1 = [4, 2, 9, 16];
line2 = [3, 7, 6.25, 3.125];
plot3c = $.jqplot('chart3c', [line1, line2], {
legend: {
show: true,
location: 'nw'
},
title: '柱狀圖2',
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barPadding: 6,
barMargin: 20
}
},
series: [{
label: '1st Qtr'
},
{
label: '2nd Qtr'
}],
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ['Q1', 'Q2', 'Q3', 'Q4']
},
yaxis: {min: 0, max: 20, numberTicks:5}
}
});
//
line1 = [['item1', 3], ['item2', 7], ['item3', 2.5], ['item4', 6], ['item5', 5], ['item6', 4]];
line2 = [3, 7, 2.5, 6, 5, 4];
plot4 = $.jqplot('chart4', [line1], {
title: '餅圖1',
seriesDefaults:{renderer:$.jqplot.PieRenderer},
legend:{show:true}
});
line1 = [['item1', 3], ['item2', 7], ['item3', 2.5], ['item4', 6], ['item5', 5], ['item6', 4]];
line2 = [3, 7, 2.5, 6, 5, 4];
plot4 = $.jqplot('chart4b', [line1], {
title: '餅圖2',
seriesDefaults:{renderer:$.jqplot.PieRenderer, rendererOptions:{sliceMargin:4}},
legend:{show:true}
});
l1 = [2.2, 3, .6, 4.8, 3];
l2 = [1, 4, 3, 2, 5.7];
l3 = [1, 5, 6, 7, 5.7];
plot5 = $.jqplot('chart5', [l1, l2,l3]);
相關文章
- JQuery蜂巢圖外掛jQuery
- Uploadify(JQuery上傳外掛)在asp.net中使用例子jQueryASP.NET
- jQuery新增到購物車動畫特效外掛jQuery動畫特效
- JQuery模板外掛-jquery.tmpljQuery
- jquery文字動畫特效外掛分享animatext.js文件jQuery動畫特效JS
- jQuery的外掛列表jQuery
- jQuery外掛擴充套件jQuery套件
- jQuery擴充套件外掛jQuery套件
- 功能齊全的jquery圖片檢視器外掛jQuery
- [20231226]vim Align外掛使用例子.txt
- 用的較為舒服的時間外掛jQuery DateTimePickerjQuery
- 下拉控制元件jQuery外掛控制元件jQuery
- jQuery外掛--表格隔行變色jQuery
- jquery複習之路---常用外掛jQuery
- 手寫jquery.cookie外掛jQueryCookie
- 非常全面的jquery 外掛網站jQuery網站
- jquery寫的ajax分頁外掛jQuery
- jQuery固定側邊欄外掛ssMenujQuerySSM
- AE外掛:Bodymovin(AE動畫匯出json外掛)動畫JSON
- jQuery帶炫酷輪播圖效果的Lightbox彈出層外掛jQuery
- 支援無限載入的js圖片畫廊外掛JS
- 用Kotlin擼一個圖片壓縮外掛-外掛基礎篇(二)Kotlin
- [外掛擴充套件]焦點圖外掛套件
- cookie外掛-jquery.cookie.js介紹CookiejQueryJS
- jQuery燈箱外掛lightBox使用方法jQuery
- 建議把datetimePicker改成jquery的外掛jQuery
- Flutter外掛開發例子分享到facebook和twitterFlutter
- php短視訊原始碼,jQuery實現自定義輪播圖外掛PHP原始碼jQuery
- jQuery和css3側邊欄滑出式圖片介紹外掛jQueryCSSS3
- jQuery簡單實用的響應式固定側邊欄外掛jQuery
- [外掛擴充套件]jQuery二維碼外掛0.2【更新瀏覽器相容】套件jQuery瀏覽器
- js彈出層Lightbox圖片畫廊外掛spotlight.jsJS
- [外掛擴充套件]圖片輪播外掛套件
- jQuery中的工具與外掛個人分享jQuery
- 手把手教你開發jquery外掛(二)jQuery
- 手把手教你開發jquery外掛(三)jQuery
- 用jquery外掛寫一個小米官網左側二級選單jQuery
- [外掛擴充套件]廣告圖片漂浮外掛套件
- [外掛擴充套件]焦點圖輪播外掛套件