0

我有以下 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' 包含位于图表区域之外的数据点时,它们会显示在网格之外(见下图)。有没有办法确保它们是隐藏的?

图 1

中的数据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",
  "origin‌​al_title":"Antiviral",
  "overview":"...",
  "popularity":1.7730000000000001,
  "productio‌​n_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
}]
4

1 回答 1

3

好的,我终于想通了!

问题出在气泡渲染器上。一个快速的 CSS 修复工作

.jqplot-series-canvas {overflow: hidden;} 
于 2013-03-15T15:34:18.283 回答