Socket
Socket
Sign inDemoInstall

biojs-vis-tooltip

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    biojs-vis-tooltip

A tooltip pop-up plugin for biojs


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
1.29 MB
Created
Weekly downloads
 

Readme

Source

BioJS Tooltip Plugin

Biojs Tooltip is a Visualization Plugin for BioJS Components. It allows the creation of tooltip windows on specific events.

Call the tooltip.table() method for a table template and design by editing obj.header and obj.rows

For example this is how biojs-vis-track implements tooltip:

var tooltip = function () {
        var tooltip = biojs.vis.tooltip.table();
        var gene_tooltip = function (gene) {
            var obj = {};
            obj.header = {
                label: "HGNC Symbol",
                value: gene.external_name
            };
            obj.rows = [];
            obj.rows.push({
                label: "Name",
                value: "<a href=''>" + gene.ID + "</a>"
            });
            obj.rows.push({
                label: "Gene Type",
                value: gene.biotype
            });
            obj.rows.push({
                label: "Location",
                value: "<a href=''>" + gene.seq_region_name + ":" + gene.start + "-" + gene.end + "</a>"
            });
            obj.rows.push({
                label: "Strand",
                value: (gene.strand === 1 ? "Forward" : "Reverse")
            });
            obj.rows.push({
                label: "Description",
                value: gene.description
            });

            tooltip.call(this, obj);
        };

        return gene_tooltip;
    };

Use tnt.css or your custom CSS file to design the tooltip.

Keywords

FAQs

Last updated on 17 Aug 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc