2017-03-08 4 views

Répondre

0

Trouvé une solution! voir ci-dessous:

options: { 
    scale: { 
     pointLabels: { 
      callback: function(pointLabel, index, labels) { 
       return screen_w > 500 ? pointLabel : ' '; 
      } 
     } 
    } 
} 

J'utilise une variable de ma propre screen_w pour retourner l'étiquette sous condition, ou rien.

Fonctionne comme un charme.

déterré: https://github.com/chartjs/Chart.js/pull/1879