Link to home
Start Free TrialLog in
Avatar of mhdi
mhdi

asked on

Javascript - calculate average from multid array

Hi,

How do I calculate the average of y?

var activity = [{
	name: 'activity',
	data: 
		[
		{name: 'one', color: '#2c2d2f', y: 12.00}, 
		{name: 'two', color: '#189e31', y: 78.4},
		{name: 'three', color: '#c1171d', y: 9.6}
		]
}]

Open in new window


Thanks
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial