2012-06-02 2 views
0

그리드 옆에있는 범례를 어떻게 움직입니까? 전설을 볼 수는 있지만 텍스트 옆에 색상이 보이지 않습니다. 시리즈 1 시리즈 2 등을 보여 주지만 그 옆에는 색상이 없습니다.JQPlot Jquery 범례가 MVC3의 플롯 뒤에 있으며 색상이 숨겨져 있습니다 (표시되지 않음). 어떻게 내가 그들을 sceren에 표시합니까

나는 JQuery와 탭

<form><fieldset> 
<div> 
<div id="tabs" title="Graphs"> 
     <ul> 
      <li><a href="#tabs-4">Graph 1</a></li> 
</ul> 
</div> 

<div id="tabs-4"><div id="chart1"/></div> 
</div> 

</fieldset></form> 

$(document).ready(function(){ 
    var s1 = [200, 600, 700, 1000]; 
    var s2 = [460, -210, 690, 820]; 
    var s3 = [-260, -440, 320, 200]; 
    // Can specify a custom tick Array. 
    // Ticks should match up one for each y value (category) in the series. 
var ticks = ['May', 'June', 'July', 'August']; 

var plot1 = $.jqplot('chart1', [s1, s2, s3], { 
    // The "seriesDefaults" option is an options object that will 
    // be applied to all series in the chart. 
    seriesDefaults:{ 
     renderer:$.jqplot.BarRenderer, 
     rendererOptions: {fillToZero: true} 
    }, 
    // Custom labels for the series are specified with the "label" 
    // option on the series option. Here a series option object 
    // is specified for each series. 
    series:[ 
     {label:'Hotel'}, 
     {label:'Event Regristration'}, 
     {label:'Airfare'} 
    ], 
    // Show the legend and put it outside the grid, but inside the 
    // plot container, shrinking the grid to accomodate the legend. 
    // A value of "outside" would not shrink the grid and allow 
    // the legend to overflow the container. 
    legend: { 
     show: true, 
     placement: 'outsideGrid' 
    }, 
    axes: { 
     // Use a category axis on the x axis and use our custom ticks. 
     xaxis: { 
      renderer: $.jqplot.CategoryAxisRenderer, 
      ticks: ticks 
     }, 
     // Pad the y axis just a little so bars can get close to, but 
     // not touch, the grid boundaries. 1.2 is the default padding. 
     yaxis: { 
      pad: 1.05, 
      tickOptions: {formatString: '$%d'} 
     } 
    } 
}); 
을 사용하고

});

전설은 그러나 차트 뒤에 나타납니다. 그리드 옆으로 이동하려면 어떻게해야합니까?

내가 위치를 시도 : NW, 오프셋, 배치,하지만 행운.

답변

1

추가 된 jquery.jqplot.css 그것은했다.

+0

문제가 해결되면 답변을 수락 해주십시오. – Boro