Skip to content
Kevin Warne edited this page May 2, 2016 · 1 revision

Wiki › Charts › Bubble Chart

A Bubble Chart is used to show the size distribution of different nodes, the Bubble Chart can also be used to group nodes by category enrollments, and sort them by change over time.

Example Usage

<script>

	function rand(){
		return Math.round(Math.random()*100+25);
	};

	function randP(){
		return (Math.random()-0.5)*0.6;
	};

	$(document).ready(function(){

		var data  = {
			data:{
				"groupings":[{"label":"All Majors", "description":""},{"label":"College", "description":"", "default_color_grouping":true},{"label":"Department", "description":"", "hideLegend":true},{"label":"STEM", "description":""}],
				"nodes":[
					{"label":"Electrical Engineering", "key":"Electrical Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Electrical and Computer Engineering", "STEM"]},
					{"label":"Computer Engineering", "key":"Computer Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Electrical and Computer Engineering", "STEM"]},
					{"label":"Mechanical Engineering", "key":"Mechanical Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Mechanical Engineering", "STEM"]},
					{"label":"Computer Science", "key":"Computer Science", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Computer Science", "STEM"]},
					{"label":"Nuclear Engineering", "key":"Nuclear Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Nuclear Engineering", "STEM"]},
					{"label":"Chemical Engineering", "key":"Chemical Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Chemical & Biological Engineering", "STEM"]},
					{"label":"Civil Engineering", "key":"Civil Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Civil Engineering", "STEM"]},
					{"label":"Architecture", "key":"Architecture", "value": rand(), "change": randP(),"enrollments":["UNM", "Architecture & Planning", "Architecture", null]},
					{"label":"Environmental Design", "key":"Environmental Design", "value": rand(), "change": randP(),"enrollments":["UNM", "Architecture & Planning", "Environmental Design", null]},
					{"label":"American Studies", "key":"American Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "American Studies", null]},
					{"label":"English", "key":"English", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "English", null]},
					{"label":"English-Philosophy", "key":"English-Philosophy", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "English", null]},
					{"label":"African American Studies", "key":"African American Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
					{"label":"African Studies", "key":"African Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
					{"label":"French", "key":"French", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
					{"label":"German", "key":"German", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
					{"label":"Portuguese", "key":"Portuguese", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
					{"label":"Russian", "key":"Russian", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
					{"label":"Russian Studies", "key":"Russian Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
					{"label":"Spanish", "key":"Spanish", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
					{"label":"History", "key":"History", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "History", null]},
					{"label":"Women Studies", "key":"Women Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Women Studies", null]},
					{"label":"Asrophysics", "key":"Asrophysics", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Physics & Astronomy", "STEM"]},
					{"label":"Physics", "key":"Physics", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Physics & Astronomy", "STEM"]},
					{"label":"Physics & Astrophysics", "key":"Physics & Astrophysics", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Physics & Astronomy", "STEM"]},
					{"label":"Environmental Sciences", "key":"Environmental Sciences", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Environmental Sciences", "STEM"]},
					{"label":"Geography", "key":"Geography", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Geography", "STEM"]},
					{"label":"Statistics", "key":"Statistics", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Statistics", "STEM"]},
					{"label":"Anthropology", "key":"Anthropology", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Anthropology", null]},
					{"label":"Communications", "key":"Communications", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Communications", null]},
					{"label":"Journalism & Mass Communications", "key":"Journalism & Mass Communications", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Communications", null]},
					{"label":"Mass Communications", "key":"Mass Communications", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Communications", null]},
					{"label":"Linguistics", "key":"Linguistics", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Linguistics", null]},
					{"label":"Political Science", "key":"Political Science", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Political Science", null]},
					{"label":"Psychology", "key":"Psychology", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Psychology", null]},
					{"label":"Speech & Hearing Sciences", "key":"Speech & Hearing Sciences", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Speech & Hearing Sciences", null]},
					{"label":"Signed Language Interpretating", "key":"Signed Language Interpretating", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Signed Language Interpretating", null]},
					{"label":"Sociology", "key":"Sociology", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Sociology", null]},
					{"label":"Art Education", "key":"Art Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Educational Specialties", null]},
					{"label":"Special Education", "key":"Special Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Educational Specialties", null]},
					{"label":"Athletic Training", "key":"Athletic Training", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Health, Exercise, and Sports Sciences", null]},
					{"label":"Exercise Science", "key":"Exercise Science", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Health, Exercise, and Sports Sciences", null]},
					{"label":"Health Education", "key":"Health Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Health, Exercise, and Sports Sciences", null]},
					{"label":"Physical Education Teacher Education", "key":"Physical Education Teacher Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Health, Exercise, and Sports Sciences", null]},
					{"label":"Sport Administration", "key":"Sport Administration", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Health, Exercise, and Sports Sciences", null]},
					{"label":"Counselor Education", "key":"Counselor Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Individual, Family, and Community Education", null]},
					{"label":"Early Childhood Multicultural Education", "key":"Early Childhood Multicultural Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Individual, Family, and Community Education", null]},
					{"label":"Educational Psychology", "key":"Educational Psychology", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Individual, Family, and Community Education", null]},
					{"label":"Family Studies", "key":"Family Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Individual, Family, and Community Education", null]},
					{"label":"Nutrition", "key":"Nutrition", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Individual, Family, and Community Education", null]},
					{"label":"Language, Literacy, and Sociocultural Studies", "key":"Language, Literacy, and Sociocultural Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Language, Literacy, and Sociocultural Studies", null]},
					{"label":"Educational Linguistics", "key":"Educational Linguistics", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Language, Literacy, and Sociocultural Studies", null]},
					{"label":"Elementary Education", "key":"Elementary Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Teacher Education, Educational Leadership & Policy", null]},
					{"label":"Secondary Education", "key":"Secondary Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Teacher Education, Educational Leadership & Policy", null]},
					{"label":"Educational Leadership", "key":"Educational Leadership", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Teacher Education, Educational Leadership & Policy", null]},
					{"label":"Teacher Education Graduate Degrees and Post Master's Certificates", "key":"Teacher Education Graduate Degrees and Post Master's Certificates", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Teacher Education, Educational Leadership & Policy", null]},
					{"label":"Online MA in Education Program", "key":"Online MA in Education Program", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Teacher Education, Educational Leadership & Policy", null]},
					{"label":"Medical Laboratory Sciences", "key":"Medical Laboratory Sciences", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Medical Laboratory Sciences", "STEM"]},
					{"label":"Nuclear Medical Imaging", "key":"Nuclear Medical Imaging", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Nuclear Medical Imaging", "STEM"]},
					{"label":"Physician Assistant Studies", "key":"Physician Assistant Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Physician Assistant Studies", "STEM"]},
					{"label":"Radiography", "key":"Radiography", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Radiography", "STEM"]},
					{"label":"University Studies", "key":"University Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "University College", "University Studies", null]},
					{"label":"Native American Studies", "key":"Native American Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "University College", "Native American Studies", null]},
					{"label":"Biology", "key":"Biology", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Biology", "STEM"]},
					{"label":"Chemistry", "key":"Chemistry", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Chemistry", "STEM"]},
					{"label":"Math", "key":"Math", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Mathematics", "STEM"]},
					{"label":"Criminology", "key":"Criminology", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Criminology", null]},
					{"label":"Art", "key":"Art", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Art & Art History", null]},
					{"label":"Art History", "key":"Art History", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Art & Art History", null]},
					{"label":"Dance", "key":"Dance", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Theatre & Dance", null]},
					{"label":"Theatre", "key":"Theatre", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Theatre & Dance", null]},
					{"label":"Music", "key":"Music", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Music", null]},
					{"label":"Media Arts", "key":"Media Arts", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Cinematic Arts", null]},
					{"label":"Emergency Medical Services", "key":"Emergency Medical Services", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Emergency Medicine", null]},
					{"label":"Dental Hygiene", "key":"Dental Hygiene", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Dental", null]},
					{"label":"Nursing", "key":"Nursing", "value": rand(), "change": randP(),"enrollments":["UNM", "Nursing", "Nursing", null]},
					{"label":"Doctor of Pharmacy", "key":"Doctor of Pharmacy", "value": rand(), "change": randP(),"enrollments":["UNM", "Pharmacy", "Doctor of Pharmacy", null]}
				]
			}
		};

		var chart = new d2b.CHARTS.bubbleChart();

		chart
			.select('.bubble-chart')
			.width($(window).width())
			.height($(window).height())
			.xFormat({nice:true,siPrefixed:false,units:{after:' students'}, separateThousands:false,precision:0})
			.controls({sortByChange:{visible:true, enabled:true},hideLegend:{visible:true},colorByChange:{visible:true}})
			.data(data)
			.update();

	})
</script>

<body style='margin:0px;'>
	<div class = 'bubble-chart'></div>
</body>

Constructor

# new d2b.CHARTS.bubbleChart()

Returns a constructor for a new bubbleChart.

Operating on the Chart

To learn how to use the common chart interface and properties (e.g. height, width, select, selection..), view the main chart page here. For bubble-chart specific properties view below.

A bubbleChart has a number of different methods used for creation and customization of the chart. The operators return the bubbleChart, which enables concise method chaining.

Properties

# chart.legendOrientation([orientation])

If orientation is specified, sets the orientation. The following orientations are supported:

  • "top" - horizontal legend above the chart
  • "bottom" - horizontal legend below the chart
  • "left" - vertical legend to the left of the chart
  • "right" - vertical legend to the right of the chart

If orientation is not specified, returns the current orientation which defaults to "bottom".

# chart.xFormat([format])

If format is specified, sets the x value format. The format object may contain any or all of the attributes listed below:

{  
  nice:false,               // nicely format the value e.g. '4231785' => '4.231785 million'
                            // default: false, if true will override siPrefixed and searateThousands options

  siPrefixed:true,          // uses d3's "s" format type
                            // default: false, if true will override searateThousands option

  separateThousands:false,  // uses d3's "," format type
                            // default: false

  units:{                   // before and after unit strings
    before:"",              // default: ""
    after:""                // default: ""
  },

  precision:4               // sets the decimal precision
                            // default: null
}

If format is not specified, returns the current format method.

# chart.controls([controls])

If controls is specified, sets the chart controls. The controls object may contain any or all of the attributes listed below:

{
	hideLegend:{			// legend hiding checkbox
    enabled:false,  // default: false
    visible:false   // default: false
	},
	sortByChange:{		// sort bubble chart by change checkbox
    enabled:false,  // default: false
    visible:false   // default: false
	},
	colorByChange:{		// color bubble chart by change checkbox
    enabled:false,  // default: false
    visible:false   // default: false
	}
}

If controls is not specified, returns the current controls object.

Data

The data passed to the chart defines how the visualization is constructed. The bubbleChart uses an array of nodes to specify node values and enrollments.

# chart.data([data])

If data is specified, sets the current chart data.

If data is not specified, returns the current chart data.

{
	data:{
		"groupings":[{"label":"All Majors", "description":""},{"label":"College", "description":"", "default_color_grouping":true},{"label":"Department", "description":"", "hideLegend":true},{"label":"STEM", "description":""}],
		"nodes":[
			{"label":"Electrical Engineering", "key":"Electrical Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Electrical and Computer Engineering", "STEM"]},
			{"label":"Computer Engineering", "key":"Computer Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Electrical and Computer Engineering", "STEM"]},
			{"label":"Mechanical Engineering", "key":"Mechanical Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Mechanical Engineering", "STEM"]},
			{"label":"Computer Science", "key":"Computer Science", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Computer Science", "STEM"]},
			{"label":"Nuclear Engineering", "key":"Nuclear Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Nuclear Engineering", "STEM"]},
			{"label":"Chemical Engineering", "key":"Chemical Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Chemical & Biological Engineering", "STEM"]},
			{"label":"Civil Engineering", "key":"Civil Engineering", "value": rand(), "change": randP(),"enrollments":["UNM", "Engineering", "Civil Engineering", "STEM"]},
			{"label":"Architecture", "key":"Architecture", "value": rand(), "change": randP(),"enrollments":["UNM", "Architecture & Planning", "Architecture", null]},
			{"label":"Environmental Design", "key":"Environmental Design", "value": rand(), "change": randP(),"enrollments":["UNM", "Architecture & Planning", "Environmental Design", null]},
			{"label":"American Studies", "key":"American Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "American Studies", null]},
			{"label":"English", "key":"English", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "English", null]},
			{"label":"English-Philosophy", "key":"English-Philosophy", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "English", null]},
			{"label":"African American Studies", "key":"African American Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
			{"label":"African Studies", "key":"African Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
			{"label":"French", "key":"French", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
			{"label":"German", "key":"German", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
			{"label":"Portuguese", "key":"Portuguese", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
			{"label":"Russian", "key":"Russian", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
			{"label":"Russian Studies", "key":"Russian Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
			{"label":"Spanish", "key":"Spanish", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Foregin Languages & Literature", null]},
			{"label":"History", "key":"History", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "History", null]},
			{"label":"Women Studies", "key":"Women Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Humanities", "Women Studies", null]},
			{"label":"Asrophysics", "key":"Asrophysics", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Physics & Astronomy", "STEM"]},
			{"label":"Physics", "key":"Physics", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Physics & Astronomy", "STEM"]},
			{"label":"Physics & Astrophysics", "key":"Physics & Astrophysics", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Physics & Astronomy", "STEM"]},
			{"label":"Environmental Sciences", "key":"Environmental Sciences", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Environmental Sciences", "STEM"]},
			{"label":"Geography", "key":"Geography", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Geography", "STEM"]},
			{"label":"Statistics", "key":"Statistics", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Statistics", "STEM"]},
			{"label":"Anthropology", "key":"Anthropology", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Anthropology", null]},
			{"label":"Communications", "key":"Communications", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Communications", null]},
			{"label":"Journalism & Mass Communications", "key":"Journalism & Mass Communications", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Communications", null]},
			{"label":"Mass Communications", "key":"Mass Communications", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Communications", null]},
			{"label":"Linguistics", "key":"Linguistics", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Linguistics", null]},
			{"label":"Political Science", "key":"Political Science", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Political Science", null]},
			{"label":"Psychology", "key":"Psychology", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Psychology", null]},
			{"label":"Speech & Hearing Sciences", "key":"Speech & Hearing Sciences", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Speech & Hearing Sciences", null]},
			{"label":"Signed Language Interpretating", "key":"Signed Language Interpretating", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Signed Language Interpretating", null]},
			{"label":"Sociology", "key":"Sociology", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Sociology", null]},
			{"label":"Art Education", "key":"Art Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Educational Specialties", null]},
			{"label":"Special Education", "key":"Special Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Educational Specialties", null]},
			{"label":"Athletic Training", "key":"Athletic Training", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Health, Exercise, and Sports Sciences", null]},
			{"label":"Exercise Science", "key":"Exercise Science", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Health, Exercise, and Sports Sciences", null]},
			{"label":"Health Education", "key":"Health Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Health, Exercise, and Sports Sciences", null]},
			{"label":"Physical Education Teacher Education", "key":"Physical Education Teacher Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Health, Exercise, and Sports Sciences", null]},
			{"label":"Sport Administration", "key":"Sport Administration", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Health, Exercise, and Sports Sciences", null]},
			{"label":"Counselor Education", "key":"Counselor Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Individual, Family, and Community Education", null]},
			{"label":"Early Childhood Multicultural Education", "key":"Early Childhood Multicultural Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Individual, Family, and Community Education", null]},
			{"label":"Educational Psychology", "key":"Educational Psychology", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Individual, Family, and Community Education", null]},
			{"label":"Family Studies", "key":"Family Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Individual, Family, and Community Education", null]},
			{"label":"Nutrition", "key":"Nutrition", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Individual, Family, and Community Education", null]},
			{"label":"Language, Literacy, and Sociocultural Studies", "key":"Language, Literacy, and Sociocultural Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Language, Literacy, and Sociocultural Studies", null]},
			{"label":"Educational Linguistics", "key":"Educational Linguistics", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Language, Literacy, and Sociocultural Studies", null]},
			{"label":"Elementary Education", "key":"Elementary Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Teacher Education, Educational Leadership & Policy", null]},
			{"label":"Secondary Education", "key":"Secondary Education", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Teacher Education, Educational Leadership & Policy", null]},
			{"label":"Educational Leadership", "key":"Educational Leadership", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Teacher Education, Educational Leadership & Policy", null]},
			{"label":"Teacher Education Graduate Degrees and Post Master's Certificates", "key":"Teacher Education Graduate Degrees and Post Master's Certificates", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Teacher Education, Educational Leadership & Policy", null]},
			{"label":"Online MA in Education Program", "key":"Online MA in Education Program", "value": rand(), "change": randP(),"enrollments":["UNM", "Education", "Department of Teacher Education, Educational Leadership & Policy", null]},
			{"label":"Medical Laboratory Sciences", "key":"Medical Laboratory Sciences", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Medical Laboratory Sciences", "STEM"]},
			{"label":"Nuclear Medical Imaging", "key":"Nuclear Medical Imaging", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Nuclear Medical Imaging", "STEM"]},
			{"label":"Physician Assistant Studies", "key":"Physician Assistant Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Physician Assistant Studies", "STEM"]},
			{"label":"Radiography", "key":"Radiography", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Radiography", "STEM"]},
			{"label":"University Studies", "key":"University Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "University College", "University Studies", null]},
			{"label":"Native American Studies", "key":"Native American Studies", "value": rand(), "change": randP(),"enrollments":["UNM", "University College", "Native American Studies", null]},
			{"label":"Biology", "key":"Biology", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Biology", "STEM"]},
			{"label":"Chemistry", "key":"Chemistry", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Chemistry", "STEM"]},
			{"label":"Math", "key":"Math", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Natural Sciences", "Mathematics", "STEM"]},
			{"label":"Criminology", "key":"Criminology", "value": rand(), "change": randP(),"enrollments":["UNM", "Arts and Sciences Social Sciences", "Criminology", null]},
			{"label":"Art", "key":"Art", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Art & Art History", null]},
			{"label":"Art History", "key":"Art History", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Art & Art History", null]},
			{"label":"Dance", "key":"Dance", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Theatre & Dance", null]},
			{"label":"Theatre", "key":"Theatre", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Theatre & Dance", null]},
			{"label":"Music", "key":"Music", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Music", null]},
			{"label":"Media Arts", "key":"Media Arts", "value": rand(), "change": randP(),"enrollments":["UNM", "Fine Arts", "Cinematic Arts", null]},
			{"label":"Emergency Medical Services", "key":"Emergency Medical Services", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Emergency Medicine", null]},
			{"label":"Dental Hygiene", "key":"Dental Hygiene", "value": rand(), "change": randP(),"enrollments":["UNM", "Medicine", "Dental", null]},
			{"label":"Nursing", "key":"Nursing", "value": rand(), "change": randP(),"enrollments":["UNM", "Nursing", "Nursing", null]},
			{"label":"Doctor of Pharmacy", "key":"Doctor of Pharmacy", "value": rand(), "change": randP(),"enrollments":["UNM", "Pharmacy", "Doctor of Pharmacy", null]}
		]
	}
}

Updating

# chart.update()

Updates the chart with the newly defined set of properties. Usually the chart will smoothly transition from the previous state to the new one.

# chart.generate()

Optionally, you may want to regenerate (empty and rebuild) the chart. This will build the new chart without an initial animation.

Clone this wiki locally