我有以下JQ情节图。
plot1 = $.jqplot('chart1',[arr2],{
axes:{
xaxis:{
renderer:$.jqplot.DateAxisRenderer,
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions:{formatString:'%d %b %Y'},
min:'Mar 01, 2013',
max: 'Jun 01, 2013',
tickInterval:'1 month',
numberTicks: '11',
label: 'Release Date',
},
yaxis:{
renderer:$.jqplot.LogAxisRenderer,
tickOptions:{showMark: true},
label: 'Media Buzz',
showGridline: true,
show: false,
//padMin: '0',
//padMax: '0',
min: '0.2',
max: '50',
}
},
cursor:{
show: true,
zoom:true,
showTooltip:false,
constrainZoomTo: 'x',
showVerticalLine: true
},
seriesDefaults:{
renderer: $.jqplot.BubbleRenderer,
rendererOptions: {
autoscaleBubbles: false,
escapeHtml: false
},
shadow: true
}
}
问题是,当数组'arr2'包含位于图表区域之外的数据点时,它们将显示在网格外(参见下图)。有没有办法确保它们被隐藏?
,arr2
中的数据是:
["2013-02-27",30,10,"Events","Oscars"],
["2013-02-01",1.7730000000000001,10,"E1","Anti-viral",
{"budget":0,"genres": [
{"id":9648,"name":"Mystery"},
{"id":878,"name":"Science Fiction"},
{"id":53,"name":"Thriller"}
],
"id":125490,
"imdb_id":"tt2099556",
"original_title":"Antiviral",
"overview":"...",
"popularity":1.7730000000000001,
"production_companies":[],
"production_countries":[],
"release_date":"2012-10-12",
"revenue":0,
"runtime":110,
"spoken_languages":[
{"iso_639_1":"en","name":"English"}
],
"title":"Antiviral",
"vote_average":7.3,
"vote_count":2
}]
答案 0 :(得分:3)
好的,我终于明白了!
问题在于气泡渲染器。一个快速的CSS修复工作
.jqplot-series-canvas {overflow: hidden;}