2017-04-19 66 views

回答

1
<Bar 
    data={{ 
     labels: this.props.labels, 
     datasets: this.props.data 
    }} 
    options={{ 
     legend: { 
     display: false 
     }, 
     scales: { 
     yAxes: [{ 
      ticks: { 
       max: this.props.maxY, 
       min: 0, 
       stepSize: 3 
      } 
      }] 
     }, 
     title: { 
     display: this.props.display, 
     text: this.props.title 
     } 
    }} 
/> 
+1

歡迎來到Stack Overflow。向您發佈的代碼中添加一些解釋文字是一個好主意,以防止它們被標記爲低質量。 –

+0

很高興知道:)謝謝! – Stef12