Giter Site home page Giter Site logo

d3-bootstrap-plugins's Introduction

d3.js meets bootstrap

js/css duo for bootstrap style Tooltips and Popovers.

How does it work?

The tooltip function attaches event listeners to selections that go and display bootstrap tooltips or popovers when the specified events are detected.

An example of how to use it:

    selection.tooltip(function(d,i){
        return {        
            content:{
                type: "tooltip" //Other option: popover
                text: d.title
                //For popovers
                content: svg //A d3 svg element
                title: "A title"
            },
            detection:{
                type: "shape" //Work in progress. Check back later
            },
            placement:{
                type: "fixed"
                gravity: "right" //left,top,bottom
                position: [d.x,d.y] 
            },            
            mousemove: false
        };
    })
    

Viola! Tooltips! Popovers!

Current TODOS

  • Add in better defaults.
  • Get the animated fading going.
  • Divorce tooltips from popovers. Make them both call the same/ positioning and eventing method, but have them pass in the created html.
  • Get easy voronoi detection working without breaking everything.
  • Write some tests.
  • Use it in production.

License

Major components:

Everything else:

Public domain.

d3-bootstrap-plugins's People

Contributors

marcneuwirth avatar zmaril avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.