Giter VIP home page Giter VIP logo

ndtv-d3's People

Contributors

michalgm avatar skyebend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ndtv-d3's Issues

network not displaying correctly when aggregating over a long time window

Somehow the ndtv-d3 player is not positioning things correctly when I generate a network that aggregates over multiple time steps.

R code to reproduce the issue

library(ndtv)
data(windsurfers)
slice.par<-list(start=0,end=24,interval=1, 
                aggregate.dur=7,rule="latest")
windsurfers<-compute.animation(windsurfers,slice.par=slice.par,
                               default.dist=3,
                               animation.mode='MDSJ',
                               verbose=FALSE)
render.d3movie(windsurfers,vertex.col="group1",
                 edge.col="darkgray",
                 displaylabels=TRUE,label.cex=.6,
                 label.col="blue", verbose=FALSE,
               main='Windsurfer interactions, 7-day aggregation')

Should look like:

http://statnet.org/movies/ndtv_vignette/windsurfers_v2.mp4

discrepancy in timeIndex data

On windsurfers network, timeIndex[0]['edge.col'] is set to a single-item array, with the value of rgba(169,169,169,1). But since i expect all edge/node properties to be arrays of all active nodes/edges, i am only applying this property to edge id 1. Is this what is intended? I could detect for single-item arrays and apply those values to all edges/nodes - goofy, but I think it would work, since the only overlap with normal behavior is when there's only one item anyway. Ideally, properties that should be applied to all active items should be either in a separate data object, have a decorator on the key (i.e. global.edge.col or something) or a single value as opposed to an array (although that would be tricky due to some values being arrays - I'm already hitting that issue with the graph-level properties).

render.3dmovie produces an empty output

Hello,

I am having some issues with rendering the movie using (render.3dmovie). When I use render.animation() I can see each timepoint displayed but render.3dmovie just gives me an empty movie...
Here is what I tried:
`compute.animation(net_dyn, slice.par = list(
start = 2,
end = 20,
interval = 1,
aggregate.dur = 2,
rule = "any"
))

render.d3movie(net_dyn, output.mode = 'htmlWidget', displaylabels=FALSE)`

I provide a sample of my network:
https://github.com/alievakrash/connectivity

add support for specifying which graph elements should be included in an inspector box on click.

example of a basic inspector box requested :
http://shiny.rstudio.com/gallery/nvd3-line-chart-output.html

probably could pass in a config object through the options:

From the r side it would look like

inspectionAttributes=list(
vertices=c('id','status'),
edges=c('id','tail_id','head_id','infecting')
)

where 'id', 'tail_id' and 'head_id' are specially interpreted, but other properties are looked up by directly querying the networkObject. active attributes will need to be matched (if 'status' doesn't exist, look for 'status.active') and attributes extract for the appropriate time period. hmm, i guess these would need to be added to the render, so that you won't have to write the time binning code?

need to implement label.cex property

I forgot to include this on the list. It is a very commonly used property (controlling the text size of the label). Should be easy to implement, right?

debug line left in?

noticed this on console while looking at other stuff
loadData: 346.41ms ndtv-d3.js (line 482)

Switch tooltips to node labels

I was wondering if you could give me any pointers (or provide an option for future releases) for having labels be displayed as tooltips for graphs that would be cluttered with label displays. I've been looking at the code that displays the tooltips, but I can't immediately see how to change it to display node labels instead of their ids.

make enter/exit animation colors optional and adjustable

need to be able to disable the green/red color animations (when the edge colors already mean something) and perhaps set what the colors should be. Former probably as a config option, and the later as a css property. Or perhaps having css set stroke-default will work.

edges often appear not attached to any vertices

this is in short.stergm.sim, where vertices are always present. this is especially noticeable when steping back and forth 1 frame at a time. maybe has something to do with the cached coords?

Add some kind of 'about' content with links to the statnet site

Need to have some sort of way for people to find out what the tool is and who made it. I think maybe adding the additional 'settings' or 'menu' button with the play buttons, that pops up a menu with an about link. That link could either display the text, or have the link to the LICENSE page on github?

'main' title does not work with dynamic attributes

The code below should produce a network in which the main title says "foo" at time 0-1 and 'bar' at time 1-2

library(ndtv)
data(short.stergm.sim)
activate.network.attribute(short.stergm.sim,'label','foo',onset=0,terminus=1)
activate.network.attribute(short.stergm.sim,'label','bar',onset=1,terminus=2)
render.d3movie(short.stergm.sim,main=function(slice){slice%n%'label'})

instead, doesn't load network in browser, and gives

TypeError: value.split is not a function
value = value.split('\n');
file514...f8.html (line 1250, col 24)

and

TypeError: n3.timeIndex[n3.currTime].renderData is undefined
var xlab = n3.timeIndex[n3.currTime].renderData.graph.xlab;
file514...f8.html (line 931, col 8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.