2017-05-26 158 views

回答

0

const options = { 
 
     scales: { 
 
      xAxes: [{ 
 
       stacked: true 
 
      }], 
 
      yAxes: [{ 
 
       stacked: true 
 
      }] 
 
     } 
 
    } 
 

 
    let data ={ 
 
     datasets:[{ 
 
     label: 'test1', 
 
      data :[1] 
 
     }, 
 
     { 
 
      label: 'test2', 
 
      data: [2] 
 
     }], 
 
     labels:['label'] 
 
    } 
 
    
 
    render(){ 
 
     return <Bar data={data} options={options} /> 
 
    }

相關問題