JQPlot Jquery Legend在MVC3中的情节后面,颜色是隐藏的(未显示).我如何在 sceren 上显示它



如何将图例移动到网格旁边? 我可以看到图例,但我看不到文本旁边的颜色。 它只显示系列1系列2等,但旁边没有颜色。

我正在使用 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,偏移,放置,但没有运气。

添加了jquery.jqplot.css它起作用了。

最新更新