GithubHelp home page GithubHelp logo

ipshitac / sunburst-chart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from personality-insights/sunburst-chart

0.0 1.0 0.0 1.09 MB

A visualization for IBM Watson Personality Insights service output.

License: Apache License 2.0

CoffeeScript 11.96% JavaScript 88.04%

sunburst-chart's Introduction

Personality Sunburst Chart

last-release npm-version npm-license npm-downloads

A visualization for IBM Watson Personality Insights service output. This widget displays personality trait values in a sunburst chart.

Personality Sunburst Chart

Getting Started

  1. Include the script in your page
<script src="path/to/personality-sunburst-chart.standalone.js"></script>

Also, be sure to include the JQuery and D3js script files.

  1. Add a container element in your HTML
<div id='sunburstChartContainer'></div>
  1. Generate the visualization for a profile.
var chart = new PersonalitySunburstChart('sunburstChartContainer');
chart.show(profile, 'path/to/profile_photo.jpg');

See the complete example code or try it live.

API Method

Public methods:

  • constructor :: (ContainerId[, Options]) - Creates the PersonalitySunburstChart object.
  • show :: (PIProfile[, ImageURL]) - Renders the visualization for the given profile, optionally including the image in the center.

Where:

  • ContainerID is a String and refers to the id attribute of a HTML component.
  • Options is an Object with may contain the following attributes:
    • Options.scale : The scale of the visualization. Default is 1.
    • Options.width : The width of the visualization container. Default is 100%.
    • Options.height: The height of the visualization container. Default is 100%.
  • PIProfile is a IBM Watson Personality Insights profile which is basically the service JSON output, parsed into a JavaScript Object.
  • ImageURL is a String containing the URL for the image to display in the center of the visualization. Supported formats are PNG, JPEG or SVG.

Build from source

You can run gulp command to build the component. Binaries will be deployed to bin.

sunburst-chart's People

Contributors

arypbatista avatar germanattanasio avatar

Watchers

Ipshita Chatterjee 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.