2

我遵循了另一个问题的答案,并绝对确定 jquery.jqplot.css 已正确包含,但我仍然无法显示颜色。我尝试了很多渲染器(默认、条形、漏斗),但它们都不起作用。我什至尝试使用增强的图例渲染器无济于事。

这是我用来渲染图表的代码。一切正常,除了传说

plot2 = $j.jqplot('chart_palnie', [serie], {
seriesDefaults: {
    renderer:$j.jqplot.FunnelRenderer,
    rendererOptions:{
         sectionMargin: 8,
         widthRatio: 0.3,
         showDataLabels: true,
         dataLabels: serie_labeluri,
         dataLabelThreshold: 0
         //dataLabelFormatString: '%s, %d'
     }
 },
 legend: { 
    show:true, 
    location: 'e', 
    showLabels: true,
    showSwatch: true
}
});
4

2 回答 2

4

包括 CSS 文件jquery.jqplot.css .. 这为我解决了

于 2014-01-09T11:29:36.890 回答
1

尝试添加展示位置选项。我还包括了 renderOptions,但在我的情况下,这主要是为了支持 IE。

legend: {
            show: true,
            location: 'n',
            placement: 'inside',
            renderer: $.jqplot.EnhancedLegendRenderer,
            rendererOptions: {
                numberRows: 1,
                disableIEFading: true
            }
        }
于 2013-07-02T12:11:36.960 回答