stream-graph

How to make D3 Streamgraph vertically

我与影子孤独终老i 提交于 2019-12-06 02:08:18
I'm new in D3, so my question probably is pretty simple, but for me it's a big problem right now. Question: How to make Streamgraph vertically? my JSFiddle I have this: I should have this: Fiddle is here JS var dataMetric = [ { "id": 1, "title": "Little Inc", "metrics": { "offers": 665, "shares": 20, "landings": 1124, "leads": 1102, "purchases": 88, "friends": 74 } }, { "id": 2, "title": "Marvin LLC", "metrics": { "offers": 20, "shares": 2, "landings": 20, "leads": 25, "purchases": 28, "friends": 18 } }, { "id": 3, "title": "Hodkiewicz, Jacobson and O'Conner", "metrics": { "offers": 834,

How to attach properties other than x,y,y0 to a layer of streamgraph in d3?

我的未来我决定 提交于 2019-12-05 15:46:03
I am a d3 newbie and I've been trying to customize the Streamgraph example ( http://mbostock.github.com/d3/ex/stream.html ): I have run into some issues: I want to assign a custom data property (for examples sake, lets just say its a label called "type") to each layer in the stream so that when you hover over that layer, a popup box appears with the "type" listed for that layer. When I input my data source into the graph I use this code: vis.selectAll("path") .data(data0) .enter().append("path") The graph only seems to take data of the format: [ [ { "x": 0, "y": 91, "y0": 1.11 }, { "x": 1, "y"

transition when adding new data to d3 streamgraph

时光毁灭记忆、已成空白 提交于 2019-12-03 14:28:02
I use d3 to draw a stream graph very similar to the official example http://bl.ocks.org/mbostock/4060954 : The only difference is how I updated it with new data. I don't only want a vertical (y-value) transition, but also want to add new data points on the right. The whole graph should become compressed in the horizontal direction. It was no problem to achieve the desired result, the only problem is that the transition between the two states does not look as expected. You can find a a minimal example of the strange transition effect on JSfiddle: http://jsfiddle.net/jaYJ9/4/ Press the update

right JSON format structure for Streamgraph example D3

拟墨画扇 提交于 2019-12-02 11:40:29
I was trying to do some examples with this streamgraph layout of D3.js. My data has this format. So the my object has objects with the name of the country andy in those objects i have several arrays with different values per month and the date for each month ("Datum") { "Irak": { "Asylberechtigt": [ 65, 60, 54, 47, 47, 30, 25, 21, 12, 6 ], "EntscheidungenInsgesamt": [ 8645, 7559, 6533, 5425, 4351, 3336, 2643, 2022, 1270, 645 ], "InsgesamtMonat": [ 1086, 1026, 1108, 1074, 1015, 693, 621, 752, 625, 645 ], "Datum": [ "2015-10-01", "2015-09-01", "2015-08-01", "2015-07-01", "2015-06-01", "2015-05

D3.js streamgraph example - generating correct area function values

跟風遠走 提交于 2019-12-01 11:18:16
I'm new to d3js and trying to adapt the streamgraph example from here http://bl.ocks.org/mbostock/4060954 : ...to work with my own data that tracks visitors to an art exhibition from different places (online, guestbook, museum). I've made some progress and I think my data's in the right format but I'm getting some really wonky final y values and my example isn't showing anything. My data starts as csv: index,date,venue,num_visitors 0,4/6/2013,online,3844 0,4/6/2013,museum,789 0,4/6/2013,guestbook,20 1,4/7/2013,online,217 1,4/7/2013,museum,718 1,4/7/2013,guestbook,20 And then I nest it to

Correct usage of stack.values([accessor]) in D3 Streamgraph?

老子叫甜甜 提交于 2019-12-01 09:56:00
问题 I am trying to create a D3 streamgraph chart with additional data per layer using a values accessor, as demonstrated in the D3 API reference and this question at Stack Overflow. The title appends fine, but it does not appear to append the values. Any ideas on what might be going wrong? I'm new to d3 so I'm sure it's straightforward. The code is below. var layers = [ { "name": "apples", "values": [ { "x": 0, "y": 91}, { "x": 1, "y": 290} ] }, { "name": "oranges", "values": [ { "x": 0, "y": 9},

D3.js streamgraph example - generating correct area function values

坚强是说给别人听的谎言 提交于 2019-12-01 08:49:18
问题 I'm new to d3js and trying to adapt the streamgraph example from here http://bl.ocks.org/mbostock/4060954: ...to work with my own data that tracks visitors to an art exhibition from different places (online, guestbook, museum). I've made some progress and I think my data's in the right format but I'm getting some really wonky final y values and my example isn't showing anything. My data starts as csv: index,date,venue,num_visitors 0,4/6/2013,online,3844 0,4/6/2013,museum,789 0,4/6/2013

D3 Real-Time streamgraph (Graph Data Visualization) [closed]

只谈情不闲聊 提交于 2019-11-28 17:05:21
I would like a stream graph as in this example: http://mbostock.github.com/d3/ex/stream.html but I would like real time data entering from the right and have old data leave from the left, such that I always have a window of 200 samples. How would I do this such that I have the appropriate transitions? I tried changing the data points in the array a and then recreating an area as such data0 = d3.layout.stack()(a); but my transitions do not make it look like the chart is sliding across the screen. Thanks in advance. mbostock Try this tutorial : When implementing realtime displays of time-series

D3 Real-Time streamgraph (Graph Data Visualization) [closed]

纵饮孤独 提交于 2019-11-27 10:23:01
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I would like a stream graph as in this example: http://mbostock.github.com/d3/ex/stream.html but I would like real time data entering from the right and have old data leave from the left, such that I always have a window of 200 samples. How would I do this such that I have the