Coder Social home page Coder Social logo

hcorrada / epiviz-chart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from epiviz/epiviz-chart

0.0 1.0 0.0 16.87 MB

Epiviz-chart: Component library for genomic data visualization

Home Page: http://epiviz.github.io/epiviz-chart

HTML 77.18% JavaScript 17.64% R 0.08% CSS 5.10%

epiviz-chart's Introduction

Usage from cdn

Add this to HTML head (loads dependencies)

<script src="https://cdn.jsdelivr.net/gh/epiviz/epiviz-chart/cdn/jquery/dist/jquery.js"></script>
<script src="https://cdn.jsdelivr.net/gh/epiviz/epiviz-chart/cdn/jquery-ui/jquery-ui.js"></script>
<script src="https://cdn.jsdelivr.net/gh/epiviz/epiviz-chart/cdn/renderingQueues/renderingQueue.js"></script>
<script src="https://cdn.jsdelivr.net/gh/epiviz/epiviz-chart/cdn/webcomponentsjs/webcomponents-lite.js"></script>

<link rel="import" href="https://cdn.jsdelivr.net/gh/epiviz/epiviz-chart/cdn/epiviz-components.html">

Installation from source

bower install epiviz/epiviz-chart

Documentation

run a local instance of polymer-server polymer serve

Then navigate to http://localhost:8080/components/epiviz-chart/

Demo

run a local instance of polymer-server polymer serve

Then navigate to http://localhost:8080/components/epiviz-chart/demo/

Update chartSettings:

# get chart
chart = document.querySelector("#chart1");
# get current chart settings
currentSettings = chart.ChartSettings;
# modify chart settings
...

# set settings back to chart
chart.setAttribute("chart-settings", JSON.stringify(currentSettings));

Epiviz-environment

must use polymer api to add charts to environment. Js dom api does not properly initialize elements

for example

if the page contains

<epiviz-environment id="env">
</epiviz-environment>

to add an epiviz chart for example line-track.

create a new element

elem = document.createElement('epiviz-scatter-plot'); 
elem.dimS = ['affy1', 'affy2']; 
elem.className="charts"

query dom for environment

ot = document.querySelector('#env')

add chart

Polymer.dom(ot).appendChild(elem)

Optimize elements for productions.

npm install -g polymer-bundler

polymer-bundler --inline-scripts --inline-css --strip-comments epiviz-charts.html > dist/epiviz-charts.html

epiviz-chart's People

Contributors

jkanche avatar alexanderyzhang avatar bradfora avatar 90lantran avatar hcorrada avatar briangottfried avatar

Watchers

James Cloos 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.