javascript - Create a stacked percentage column -


i have collection of data :

var data = [       {"p301a":"10","p301b":"7","p301c":"7","p301d":"3","p301e":"8","p301f":"8","p301g":"8","p301h":"8","p301i":"8","p301j":"8","p301k":"8","p301l":"8","p301m":"8","p301n":"8","p301o":"8","age":"31-40 years","profesion":"2","position":"2"},       {"p301a":"5","p301b":"4","p301c":"4","p301d":"4","p301e":"4","p301f":"4","p301g":"4","p301h":"4","p301i":"4","p301j":"4","p301k":"4","p301l":"4","p301m":"4","p301n":"4","p301o":"4","age":"24-30 years","profesion":"2","position":"2"},       {"p301a":"8","p301b":"8","p301c":"3","p301d":"9","p301e":"9","p301f":"4","p301g":"9","p301h":"4","p301i":"2","p301j":"9","p301k":"4","p301l":"9","p301m":"4","p301n":"9","p301o":"9","age":"31-40 years","profesion":"1","position":"3"},       {"p301a":"3","p301b":"3","p301c":"3","p301d":"8","p301e":"9","p301f":"9","p301g":"8","p301h":"9","p301i":"9","p301j":"9","p301k":"8","p301l":"8","p301m":"3","p301n":"3","p301o":"3","age":"31-40 years","profesion":"1","position":"3"},       {"p301a":"6","p301b":"5","p301c":"5","p301d":"8","p301e":"7","p301f":"5","p301g":"6","p301h":"2","p301i":"6","p301j":"5","p301k":"7","p301l":"7","p301m":"4","p301n":"8","p301o":"3","age":"24-30 years","profesion":"1","position":"2"},       {"p301a":"8","p301b":"8","p301c":"4","p301d":"4","p301e":"4","p301f":"5","p301g":"4","p301h":"4","p301i":"4","p301j":"4","p301k":"4","p301l":"9","p301m":"9","p301n":"9","p301o":"4","age":"31-40 years","profesion":"2","position":"3"}     ]; 

from data want create stacked percentage column highchartjs, stipulation of each bar having number of p301a = 1, p301a = 2 , on 10. think can done using underscore.js, not know how.

i want create somthing example

or want data :

var xaxis: {     categories: ['a', 'b', 'c' ... 'o' ] }, var series: [{     name: '1',     data: [5, 3, 4, 7, 2, 5, 9, 5, 8, 4, 5, 7, 8, 3, 4] }, {     name: '2',     data: [2, 2, 3, 2, 1, 5, 9, 5, 8, 4, 5, 7, 8, 3, 4] }, {     name: '3',     data: [3, 4, 4, 2, 5, 5, 9, 5, 8, 4, 5, 7, 8, 3, 4] }, {     name: '4',     data: [3, 4, 4, 2, 5, 5, 9, 5, 8, 4, 5, 7, 8, 3, 4] }, ... (until 10)] 

sorry english please help


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -