3.0.2 • Published 3 years ago

angular-sunburst-radar-chart v3.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

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

ParameterData TypeDescription
itemsItem[]List of items to be displayed on chart in Array format of type Item
optionsOptionsOptions to be used in chart

####Options Data Type

ParameterData TypeDefaultDescription
sizenumber800Size of Chart
maxScorenumber100Maximum score of the values
legendAxisLinePositionnumber1The position where the legend axis labels to be displayed
animateChartbooleantrueAnimate the chart while showing
splitBasedOnChildrenbooleantrueTo split the angles equally based on the total children nodes available

####Item Data Type

ParameterData TypeDescription
namestringname of the item
valuenumbervalue of Item
colorstringHexCode color string #FFF000
childrenArray of ItemArray of the same item data type

If you find it useful, try considering

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

1.1.8

3 years ago

2.0.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.2

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago