我试图在折线图中显示的示例数组,我如何使用tempatur作为y 和zeit作为 x?:
[{sid: arduino01, data: [
{temperatur: 23.23, "zeit":"2021-12-26T20:52:39.981682"},
{temperatur: 25.56, "zeit":"2021-12-26T20:52:39.981682"}
]},
{arduino02: [{temperatur: 3, "zeit":"2021-12-26T20:52:39.981682"}]}
}
<LineChart
data={data}
width={Dimensions.get('window').width - 50} // from react-native
height={220}
yAxisLabel=""
yAxisSuffix=" C"
yAxisInterval={1} // optional, defaults to 1
}}
/>