如何在 React Native svg 图表中添加自定义时间线
我正在使用 React Native svg 图表在折线图上显示一些数据。数据与需要在 x 轴上标记的某个时间相关联,任何人都可以告诉我该怎么做。
I am using react native svg charts to display some data on line chart .the data is associated with some time which need to be labelled on x axis can anybody tell me how can I do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我们查看 LineChart 时,它会像这样绘制线条。
它接受 50 个点和 10 个点,并在它们之间画一条线
它接受 10 作为点和 40 点,并在之间绘制一条线
类 LineChartExample 扩展了 React.PureComponent {
使成为() {
常量数据 = [50, 10, 40, 95, -4, -24, 85, 91, 35, 53, -53, 24, 50, -20, -80]
<前><代码>返回(
<折线图
样式={{高度:200}}
数据={数据}
svg={{ 笔画: 'rgb(134, 65, 244)' }}
contentInset={{ 顶部:20,底部:20 }}
>
<网格>>
)
}
}
When we look at LineChart, it draws the lines like this.
It accepts 50 as points and 10 points and draws a line between
It accepts 10 as points and 40 points and draws a line between
class LineChartExample extends React.PureComponent {
render() {
const data = [50, 10, 40, 95, -4, -24, 85, 91, 35, 53, -53, 24, 50, -20, -80]
}
}