Giter VIP home page Giter VIP logo

patolo / sunburst-radar-chart-workspace Goto Github PK

View Code? Open in Web Editor NEW

This project forked from muthuishere/sunburst-radar-chart-workspace

0.0 0.0 0.0 1.59 MB

Angular sunburst radar chart with no external dependencies

Home Page: https://muthuishere.github.io/sunburst-radar-chart-workspace/demo

License: MIT License

JavaScript 3.57% HTML 12.23% TypeScript 83.38% SCSS 0.56% Batchfile 0.25%

sunburst-radar-chart-workspace's Introduction

Angular Sunburst Radar Chart

A Sunburst chart component in Angular developed using no dependencies, offCourse used SVG

####Updates Migrated options into seperate object Able to rotate the chart by dragging smoother animations Better tool tip

Chart Demo

To Use

Import AngularSunburstRadarChartModule to your module .

 imports: [
    ... Other modules
    AngularSunburstRadarChartModule
  ],

in your component.ts

  const options = {"size":800,"maxScore":100,"legendAxisLinePosition":1,"animateChart":false,"splitBasedOnChildren":true}

  const items = [  {   "name": "Delaware ",   "color": "#e5b0e9",   "value": 100,   "children": [    {     "name": "Kent County",     "value": 100    },    {     "name": "New Castle County",     "value": 100    },    {     "name": "Sussex County",     "value": 100    }   ]  }, 
                 {   "name": "Hawaii ",   "value": 95,   "color": "#beefc5",   "children": [    {     "name": "Hawaii County",     "value": 95    },    {     "name": "Honolulu County",     "value": 95    },    {     "name": "Kauai County",     "value": 95    },    {     "name": "Maui County",     "value": 95    }   ]  }, 
                {   "name": "District of Columbia ",   "color": "#b7b1d0",   "value": 89,   "children": [    {     "name": "District of Columbia",     "value": 83    },    {     "name": "Ward 2",     "value": 79    },    {     "name": "Ward 3",     "value": 84    },    {     "name": "Ward 4",     "value": 88    },    {     "name": "Ward 5",     "value": 94    },    {     "name": "Ward 6",     "value": 95    },    {     "name": "Ward 7",     "value": 94    },    {     "name": "Ward 8",     "value": 92    }   ]  },  
                 {   "name": "Arizona ",   "value": 98,   "color": "#6880be",   "children": [    {     "name": "Navajo County",     "value": 99    },    {     "name": "Maricopa County",     "value": 95    },    {     "name": "Mohave County",     "value": 99    }   ]  } ]

in your component.html

<lib-sunburst-radar-chart [options]="options" [items]="items"></lib-sunburst-radar-chart>

The above will display chart something like below

SunBurst Radar Chart Output

Parameter Data Type Description
items Item[] List of items to be displayed on chart in Array format of type Item
options Options Options to be used in chart

####Options Data Type

Parameter Data Type Default Description
size number 800 Size of Chart
maxScore number 100 Maximum score of the values
legendAxisLinePosition number 1 The position where the legend axis labels to be displayed
animateChart boolean true Animate the chart while showing
splitBasedOnChildren boolean true To split the angles equally based on the total children nodes available

####Item Data Type

Parameter Data Type Description
name string name of the item
value number value of Item
color string HexCode color string #FFF000
children Array of Item Array of the same item data type

If you find it useful, try considering

Buy Me A Coffee

sunburst-radar-chart-workspace's People

Contributors

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