2014-05-10 13 views
6

Ho una necessità di alcune molto lunghe etichette multilinea sull'asse y di un grafico Highcharts bar.Highcharts - lunghi multilinea etichette dell'asse y causando seguente etichetta per essere rimosso

Il mio problema è che a lungo, etichette multilinea causano la seguente etichetta da rimuovere - probabilmente un fail-safe sovrapposizione interna di qualche tipo.

Sono al punto in cui ho aumentato la larghezza etichetta in modo che ho potuto controllare la parola stesso avvolgimento con interruzioni di riga (l'involucro parola interna produce anche lo stesso problema sto avendo con etichette mancanti.)

I Mi piacerebbe essere in grado di disattivare questa funzione e affrontare la sovrapposizione di me stesso.

Esempio: enter image description here

tabella opzioni:

{ 
    "colors": [ 
     "#00AEEF" 
    ], 
    "credits": { 
     "enabled": false 
    }, 
    "chart": { 
     "type": "bar" 
    }, 
    "tooltip": {}, 
    "plotOptions": { 
     "column": { 
      "pointPadding": 0.2, 
      "borderWidth": 0 
     }, 
     "series": { 
      "borderWidth": 0, 
      "dataLabels": { 
       "enabled": true, 
       "format": "{point.y:.1f}%" 
      } 
     } 
    }, 
    "series": [ 
     { 
      "showInLegend": false, 
      "data": [ 
       [ 
        "this is a pretty long label <br/>that will most likely cause the next<br/> row not to appear", 
        70 
       ], 
       [ 
        "this is a pretty long label <br/>that will most likely cause the next<br/> row not to appear", 
        62.5 
       ], 
       [ 
        "this is a pretty long label <br/>that will most likely cause the next<br/> row not to appear", 
        41.25 
       ], 
       [ 
        "this is a pretty long label <br/>that will most likely cause the next<br/> row not to appear", 
        26.25 
       ], 
       [ 
        "this is a pretty long label <br/>that will most likely cause the next<br/> row not to appear", 
        18.75 
       ], 
       [ 
        "this is a pretty long label <br/>that will most likely cause the next<br/> row not to appear", 
        11.25 
       ], 
       [ 
        "this is a pretty long label <br/>that will most likely cause the next<br/> row not to appear", 
        7.5 
       ], 
       [ 
        "this is a pretty long label <br/>that will most likely cause the next<br/> row not to appear", 
        3.75 
       ], 
       [ 
        "this is a pretty long label <br/>that will most likely cause the next<br/> row not to appear", 
        3.75 
       ] 
      ] 
     } 
    ], 
    "xAxis": { 
     "minorGridLineWidth": 0, 
     "minorTickLength": 0, 
     "tickLength": 0, 
     "type": "category", 
     "labels": { 
      "overflow": "justify", 
      "style": { 
       "color": "#525151", 
       "fontSize": "12px", 
       "lineHeight": "10%", 
       "fontFamily": "Helvetica Neue, Helvetica ,Helvetica,Arial,sans-serif", 
       "width": "999px" 
      }, 
      "y": -10 
     } 
    }, 
    "yAxis": { 
     "min": 0, 
     "title": { 
      "text": "Percent (%)" 
     } 
    } 
} 
+1

Hi there. Sto per suggerirti un possibile lavoro in giro. Metti un po 'un'etichetta significativa breve per ciascuna categoria e aggiungere un tooltip che vi aperar quando si sposta il cursore sopra le sbarre, questo tooltip dovrebbe contenere il testo lungo. Ecco un jsfiddle: http://jsfiddle.net/dWDE6/366/ –

+0

+1 perché mi piacerebbe. Si tratta di una richiesta del cliente =/ Molto bene può andare quella rotta se non riesco a capirlo anche se – scottysmalls

+0

ciao. se ottieni i tuoi dati da una richiesta puoi in seguito aggiungere il testo del suggerimento. Ecco un jsfiddle di come aggiungere il testo. Jsfiddle: http://jsfiddle.net/dWDE6/367/ –

risposta