2012-05-29 7 views
8

Sono in esecuzione jqPlot e per qualche motivo i quadratini con codice colore che dovrebbero apparire all'interno della legenda del renderer della torta non vengono visualizzati. Mi chiedo se abbia qualcosa a che fare con il fatto che sto usando twitter bootstrap? Non sto usando altre librerie css.jqPlot pie I quadrati della legenda del mittente non vengono visualizzati

 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,         
      } 
     }); 

risposta

18

Sei sicuro che si sta caricando la CSS del jqPlot correttamente (vale a dire l'url/href sta indicando nella posizione a destra)?

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). Qui tutti vengono visualizzati correttamente, quindi è necessario ricontrollare la href del jquery.jqplot.css.

+1

Grazie mille! Era così. –

+1

Grazie mille! Questo ha fatto e anche il mio grafico sembra molto meglio! – Lukas

+1

Lavoro come un fascino ...... – Gowri

Problemi correlati