Coder Social home page Coder Social logo

cubism-es's Introduction

cubism-es

cubism-es is an ES6 module of cubism, based on D3V5.

IMPORTANT Version 1.1.0 contains api breaks. Please see below for details

Usage:

  1. ES6 Usage
npm install cubism-es --save
import { context } from 'cubism-es';

Please note adding cubism-es will automatically add d3 as a dependency into your project. From version 1.1.2, there's no need to declare d3 as globals in your project with the webpack ProvidePlugin

  1. Standalone Usage
<script src="lib/d3.v5.min.js" charset="utf-8" type="application/javascript"></script>
<script src="lib/cubism-es.standalone.js" charset="utf-8" type="application/javascript"></script>

API Breaks (v1.1.0)

function cubism cubism-es
Context.axis d3.select(...).call(context.axis) context.axis().render(d3.select(...))
Context.rule d3.select(...).call(context.rule) context.rule().render(d3.select(...))
Context.horizon d3.select(...).call(context.horizon) context.horizon().render(d3.select(...))

API Breaks (v1.0.0 and previous)

function cubism cubism-es
Context d3.select(...).call(cubism.context) const context = cubism.context(d3.select(...)).height(30)
Context.axis d3.select(...).call(context.axis) context.axis(d3.select(...))
Context.rule d3.select(...).call(context.rule) context.rule(d3.select(...))
Context.horizon d3.select(...).call(context.horizon) context.horizon(d3.select(...))

Demo

the following samples work, you can try them by downloading this project and running npm install and npm run dev:

Development

  1. Clone repository
  2. Run commands
npm install         // install dependencies
npm run dev         // view demos in web browser at localhost:3004
npm run build       // build
npm run test        // run tests only
npm run test:cover  // run tests and view coverage report

Documentation

For more information, please visit square/cubism's home page and wiki

Limitation

Graphite, Cube and GangliaWeb have not been verified yet.

Credits

Contributors of the original cubism.

License

This project is licensed under the MIT License - see the LICENSE file for details

cubism-es's People

Contributors

bigfatdog avatar

Stargazers

ekacnet 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.