请关注我的项目我的图表,一切都很完美,只是它只显示线条数据,而不是条形图
import RTChart from 'react-rt-chart';
//data changes on state change thats why value for data of object instead of array
const data={
date: Date.now(),
Current: [1800],
Predicted: [500],
}
// note according to the documentation chart should be similar to c3 js chart option
var chart = {
data:{
types: {
Current: 'line',
},
type:"bar",
axis: {
y: { min: 0, max: 3000 }
},
}
<RTChart
fields={['Current','Predicted']}
data={data}
chart={chart}
/>