Giter Club home page Giter Club logo

newvisdock's Introduction

VisDock

What is VisDock?

VisDock is an interactive web-visualization framework written in JavaScript. VisDock allows visualization creators to import various VisDock tools into their host visuailzations for exploration and annotation purposes. An introduction video on VisDock implementation is available on YouTube.

Say you have built a visualization like the one shown above (original work by M. Bostock).



VisDock.init('body', {width: w, height:h});  // VisDock Initialization
var viewport = VisDock.getViewport();

VisDock Toolkit and the Overview can be loaded with only two lines of codes (to learn more go to Tutorial). Be sure to populate the original elements in "viewport"

var svg = viewport;


VisDock Toolkit offers various navigation options. In the figures above, pan, zoom, rotation tools, and magnifying lenses (the box with grey-stroke) have been showcased. Up to this point, no coding effort is required at all. All you have to do is just to import VisDock libraries and initialize the VisDock. Beyond this point where selection and annotations are used, minor additional coding will be required.



VisDock.eventHandler = {
        getHitsPolygon: function(points, inclusive, t) {
            var shapebound = new createPolygon(points); 
            return shapebound.intersectEllipse(d3.selectAll("circle")[0], inclusive)
        },
        getHitsEllipse: function(points, inclusive, t) {
            var shapebound = new createEllipse(points); 
            return shapebound.intersectEllipse(d3.selectAll("circle")[0], inclusive)
        },
        getHitsLine: function(points, inclusive) {
            var shapebound = new createLine(points); 
            return shapebound.intersectEllipse(d3.selectAll("circle")[0], inclusive)
        },
        setColor: function(hits) {
            for (var i = 0; i < hits.length; i++) {
                VisDock.utils.addEllipseLayer(hits[i], undefined);
            }
        },
        changeColor: function(color, query, index) {
            VisDock.utils.changeColor(color, query, "fill")
        },
        changeVisibility: function(vis, query, index) {
            VisDock.utils.changeVisibility(vis, query)
        },
        removeColor: function(hits, index) {
            for (var i = 0; i < hits.length; i++) {
                hits[i].remove();
            }
        }
}

In order to implement selections, the user-defined selection handler must be added to your original code. In this selection handler, you may define what event occurs when users use rectangle, ellipse, lasso, or line tools. Users may use these various shapes to select objects and you, the developer, can decide what happens to the selected. For instance, in the tutorial, we show how to create clone elements to hightlight the selection.

Responsive VisDock

Currently, We are working on VisDock such that it is responsive to change in the size of the window. So far the VisDock changes its size in reponse to the window size adjustment. This concept can be expanded to arrangement of the buttons or re-alignment of the menu/query box, and etc.

As shown in the figure above, the toolkit expands and shrinks as the window size changes.

Multiple viewport support

VisDock now supports Multiple viewport canvases. In order to import VisDock and control more than one viewport, you can initialize VisDock in the following manner:

var container = ["#div1", "#div2"];
var sizes = [{width: w1, height: h1}, {width: w2, height: h2}];
VisDock.init(container, sizes);
var viewport1 = VisDock.getViewport(0);
var viewport2 = VisDock.getViewport(1);

newvisdock's People

Contributors

jungujchoi avatar visdockhub avatar

Stargazers

zhangbingqi avatar Antonio Forgione avatar Davidson avatar  avatar Sean Clements avatar Ji Wang avatar Dan Delany avatar Bernd Hentschel avatar Sean McKenna avatar  avatar Sean Tai avatar Thomas Efer avatar Ian Johnson avatar Samuel Szoniecky avatar

Watchers

Samuel Szoniecky avatar  avatar James Cloos avatar Bernd Hentschel avatar  avatar  avatar

newvisdock's Issues

License

Saw your presentation at IEEE Vis. Looks useful! You should consider open source licensing your work so that folks can use it!

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.