react-vis icon indicating copy to clipboard operation
react-vis copied to clipboard

make a timeline viewer like performance timeline in chrome

Open jonnydodad opened this issue 8 years ago • 4 comments

Hi, Im having trouble making a performance timeline viewer for displaying react components rendering times, not sure what a good approach would be using react-vis. Ive tried adapting a horizontal bar graph but no success. would love to be pointed in the right direction or just hear some ideas on how to approach making this kind of graph, thanks :)

jonnydodad avatar Mar 15 '18 18:03 jonnydodad

how I would approach this is using rect series (say, HorizontalRectSeries). If you know exactly the time of the rendering that's your x prop, the duration is your width, the depth is your y and the height is an arbitrary constant.

jckr avatar Mar 15 '18 20:03 jckr

thanks a bunch!

jonnydodad avatar Mar 16 '18 04:03 jonnydodad

I’m trying to recreate something like this (taken from d3-timeline):

I gathered that HorizontalRectSeries could work for that, but I can't seem to render at the right position without explicitly defining y/y0, which wouldn’t work for yType='ordinal', right?

How can I use HorizontalRectSeries with ordinal scales? I threw up a codepen here. Or is the only alternative to use a linear scale?

jbach avatar Nov 28 '18 13:11 jbach

I would love to see whether you have got some success because I am also looking for something like this to implement using react-vis

priombiswas89 avatar May 11 '20 12:05 priombiswas89