javascript - Use d3 stack layout with data organized per points, instead of per layers -


i trying achieve along lines of stacked bars example, difference being way background data organized.

the layout assumes data organized per-layer.

has attempted use layout data organized per-data-point instead?

e.g.

   //completely random example, hope can gist.      [{     id: 1,     name: 'foo'     layers: {         a: 10,         b: 13,         c: 12       }  }, {    id: 2,    name: 'bar',    layers: {        a: 8,        b: 5,        c: 14      }  }] 

other complete remapping data becomes arranged per layers (i might have pretty huge datasets, that's why i'm asking), has ever created stacked layouts data presented thus?

you sidestep native d3 stack layout helper functions , compute rect positions data - here basic example of stacked bar data similar yours: http://jsfiddle.net/tyr2s/7/

you still need little transforming of data, might still worthwhile try transforming layer inputs d3.stack takes, present in case might helpful.

stacked bar example without stack layout


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -