react-vis

Visualizing ImmutableJS data from Redux store in a graph

时间秒杀一切 提交于 2019-12-13 12:19:38
问题 I am working on a React and Redux application that uses ImmutableJS to store all of it's state. The app receives data from a sensor at about 100 Hz. I need to draw a graph that updates in real time and displays this data. I have been using React-Vis for the graph, the problem is that it takes an array of objects and not an ImmutableJS data structure. I have solved this by converting the ImmutableJS data structure to an array like this: const data = this.props.HEGPercentage.toIndexedSeq()

show date in( MM-DD) format in x-axis using react-vis

牧云@^-^@ 提交于 2019-12-11 03:08:18
问题 I am trying to implement react-vis in my project. I need to show data based on date. I am using tickFormat for it but it is showing same date two times in x-axis.I am adding few lines of my code here. <XYPlot width={1140} height={440} > <LineMarkSeries lineStyle={{stroke: '#e0e0e0'}} markStyle={{stroke: '#6dc6c1'}} style={{ strokeWidth: '2px' }} strokeStyle="solid" data={[ { x: Date.parse("05/05/2019"), y: 0 }, { x: Date.parse("05/12/2019"), y: 12 }, { x: Date.parse("05/13/2019"), y: 16 } ]}