jqPlot pieRenderer图例方块未显示

时间:2012-05-29 04:19:08

标签: jqplot

我正在运行jqPlot,由于某种原因,应该显示在饼形渲染器图例中的颜色编码方块没有出现。我想知道它是否与我正在使用twitter bootstrap的事实有关?我没有使用任何其他css库。

        var plot1 = jQuery.jqplot('chartdiv', [graphData],
        {
            grid: {
                shadow: false, 
                background: '#FFFFFF',                                                                                          
            },
            seriesDefaults: {
                // Make this a pie chart.
                renderer: jQuery.jqplot.PieRenderer,
                rendererOptions: {
                    // Put data labels on the pie slices.
                    // By default, labels show the percentage of the slice.
                    showDataLabels: true,
                    padding: 20,
                    startAngle: 270 
                }
            },
            legend: {
                show: true,
                location: 'e',
                fontSize: 11,
                marginTop: 10,                                
            }
        });

1 个答案:

答案 0 :(得分:18)

您确定正确加载CSS的{​​{1}}(即网址/广告系列指向正确的位置)吗?

This is your code with jquery.jqplot.css loaded.

This is your code without the css.

This one is with both the jquery.jqplot.css and the bootstrap (downloaded without jQuery plugins and not linking the img folder that comes with the download).这里显示的都是正确的,因此你必须仔细检查jquery.jqplot.css的jqPlot