New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to redraw graph by supplying new data #11

Open
bittorf opened this Issue Aug 27, 2015 · 14 comments

Comments

5 participants
@bittorf
Contributor

bittorf commented Aug 27, 2015

is it possible to read in an updated json-file without redrawing everything (avoiding the funny animation at the beginning)? e.g. delete or add 1 link.

@nemesisdesign

This comment has been minimized.

Show comment
Hide comment
@nemesisdesign

nemesisdesign Aug 27, 2015

Member

I think it's possible, I'd love this library to be able to handle this feature nicely.

I would also love to allow avoiding the funny animation in the beginning!

Member

nemesisdesign commented Aug 27, 2015

I think it's possible, I'd love this library to be able to handle this feature nicely.

I would also love to allow avoiding the funny animation in the beginning!

@gubi

This comment has been minimized.

Show comment
Hide comment
@gubi

gubi Aug 30, 2015

Member

In my pull-request, I introduced init(), reInit() and destroy() functions but perhaps a dynamic solution like web-socket could be more cool...

Nice animations can be reduced a lot just setting animationAtStart to false ;)

Member

gubi commented Aug 30, 2015

In my pull-request, I introduced init(), reInit() and destroy() functions but perhaps a dynamic solution like web-socket could be more cool...

Nice animations can be reduced a lot just setting animationAtStart to false ;)

@nemesisdesign

This comment has been minimized.

Show comment
Hide comment
@nemesisdesign

nemesisdesign May 31, 2017

Member

@geekplux we should definitely do this! Do you remember we discussed about it? I'm setting it for the second phase.

Member

nemesisdesign commented May 31, 2017

@geekplux we should definitely do this! Do you remember we discussed about it? I'm setting it for the second phase.

@nemesisdesign nemesisdesign changed the title from autoreload & redraw to [GSoC17] Add a way to redraw graph by supplying new data May 31, 2017

@nemesisdesign

This comment has been minimized.

Show comment
Hide comment
@nemesisdesign

nemesisdesign May 31, 2017

Member

Let me clarify, I think we need to create a way to easily update the graph with a function/method or something like that, so we can update the graph as we get new data from a server.

Member

nemesisdesign commented May 31, 2017

Let me clarify, I think we need to create a way to easily update the graph with a function/method or something like that, so we can update the graph as we get new data from a server.

@geekplux

This comment has been minimized.

Show comment
Hide comment
@geekplux

geekplux May 31, 2017

Member

I see what you mean.

Member

geekplux commented May 31, 2017

I see what you mean.

@nemesisdesign

This comment has been minimized.

Show comment
Hide comment
@nemesisdesign

nemesisdesign May 31, 2017

Member

@geekplux great. Notice how different people asked for the same feature in #31 and #26. If you implement this feature we can implement it straightaway in django-netjsongraph, that would be nice.

Member

nemesisdesign commented May 31, 2017

@geekplux great. Notice how different people asked for the same feature in #31 and #26. If you implement this feature we can implement it straightaway in django-netjsongraph, that would be nice.

@bittorf

This comment has been minimized.

Show comment
Hide comment
@bittorf

bittorf Jun 16, 2017

Contributor

at battlemesh10 we tried to have some kind of auto-refresh with 'animationAtStart = false' and this block:

around line 209:

 if(!opts.animationAtStart) {
            opts.linkStrength = 10;             // was '2'
            opts.friction = 0.0;                // was '0.3'
            opts.gravity = 0;
        }

but this is not enough, it still "jump" during every reload. see this example here:
http://intercity-vpn.de/networks/giancarlo/meshrdf/netjson.html

Contributor

bittorf commented Jun 16, 2017

at battlemesh10 we tried to have some kind of auto-refresh with 'animationAtStart = false' and this block:

around line 209:

 if(!opts.animationAtStart) {
            opts.linkStrength = 10;             // was '2'
            opts.friction = 0.0;                // was '0.3'
            opts.gravity = 0;
        }

but this is not enough, it still "jump" during every reload. see this example here:
http://intercity-vpn.de/networks/giancarlo/meshrdf/netjson.html

@nemesisdesign

This comment has been minimized.

Show comment
Hide comment
@nemesisdesign

nemesisdesign Jun 16, 2017

Member

@bittorf I've created a new issue regarding disabling the animation in #42

Member

nemesisdesign commented Jun 16, 2017

@bittorf I've created a new issue regarding disabling the animation in #42

@nemesisdesign

This comment has been minimized.

Show comment
Hide comment
@nemesisdesign

nemesisdesign Jul 21, 2017

Member

@geekplux what's the status of this issue?

Member

nemesisdesign commented Jul 21, 2017

@geekplux what's the status of this issue?

@geekplux

This comment has been minimized.

Show comment
Hide comment
@geekplux

geekplux Jul 21, 2017

Member

done

Member

geekplux commented Jul 21, 2017

done

@geekplux geekplux moved this from To Do to WIP in Rewrite netjsongraph.js Jul 26, 2017

@nemesisdesign

This comment has been minimized.

Show comment
Hide comment
@nemesisdesign

nemesisdesign Jul 26, 2017

Member

@geekplux how can I test this?

Member

nemesisdesign commented Jul 26, 2017

@geekplux how can I test this?

@geekplux

This comment has been minimized.

Show comment
Hide comment
@geekplux

geekplux Jul 26, 2017

Member

like this:

new Netjsongraph('url').load(newData).render()
Member

geekplux commented Jul 26, 2017

like this:

new Netjsongraph('url').load(newData).render()

@geekplux geekplux moved this from WIP to Await Review in Rewrite netjsongraph.js Jul 31, 2017

@aparcar

This comment has been minimized.

Show comment
Hide comment
@aparcar

aparcar Feb 12, 2018

@geekplux is this actually implemented? I'm trying something like this:

        <script type="text/javascript">
            graph = new d3.netJsonGraph("/graph-json")

            function update_graph() {
                fetch("/graph-json", { method: 'GET' })
                    .then(res => res.json())
                    .catch(error => console.error('Error:', error))
                    .then(response => graph.load(response).render());
            }
        </script>

The graph object is just empty

aparcar commented Feb 12, 2018

@geekplux is this actually implemented? I'm trying something like this:

        <script type="text/javascript">
            graph = new d3.netJsonGraph("/graph-json")

            function update_graph() {
                fetch("/graph-json", { method: 'GET' })
                    .then(res => res.json())
                    .catch(error => console.error('Error:', error))
                    .then(response => graph.load(response).render());
            }
        </script>

The graph object is just empty

@geekplux

This comment has been minimized.

Show comment
Hide comment
@geekplux

geekplux Feb 13, 2018

Member

@aparcar you can have a try to use my version which in develop branch and refactor folder

Member

geekplux commented Feb 13, 2018

@aparcar you can have a try to use my version which in develop branch and refactor folder

@nemesisdesign nemesisdesign changed the title from [GSoC17] Add a way to redraw graph by supplying new data to Add a way to redraw graph by supplying new data Feb 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment