所以即时通讯使用chart.js
http://www.chartjs.org/docs/
我无法改变底部文字的颜色
http://www.chartjs.org/docs/
我无法改变底部文字的颜色
例如:
“一月”,“二月”,“三月”,“四月”,“五一”,“六一”,“七一”
以及左侧的数字
我尝试了所有这些选项:
scaleFontColor:“#FFFFFF”
pointLabelFontColor:“#FFFFFF”
我的完整代码:
<script> var randomScalingFactor = function(){ return Math.round(Math.random()*100)}; var lineChartData = { labels : ["January","February","March","April","May","June","July"],datasets : [ { label: "My Second dataset",fillColor : "rgba(255,89,114,0.6)",strokeColor : "rgba(51,51,1)",pointColor : "rgba(255,pointStrokeColor : "#fff",pointHighlightFill : "#fff",pointHighlightStroke : "rgba(151,187,205,maintainAspectRatio: false,scaleFontColor: "#FFFFFF",pointLabelFontColor : "#FFFFFF",pointLabelFontSize : 30,data : [1,2,10,7,3,1] } ] } window.onload = function(){ var ctx = document.getElementById("canvas").getContext("2d"); window.myLine = new Chart(ctx).Line(lineChartData,{ responsive: true }); } </script>