(legendId, legendGroup, legendItem)
| 18 | var i, j; |
| 19 | |
| 20 | function addOneItem(legendId, legendGroup, legendItem) { |
| 21 | if(opts.visible === false) return; |
| 22 | if(hasMultipleLegends && legendId !== opts._id) return; |
| 23 | |
| 24 | // each '' legend group is treated as a separate group |
| 25 | if(legendGroup === '' || !helpers.isGrouped(opts)) { |
| 26 | // TODO: check this against fullData legendgroups? |
| 27 | var uniqueGroup = '~~i' + lgroupi; |
| 28 | lgroups.push(uniqueGroup); |
| 29 | lgroupToTraces[uniqueGroup] = [legendItem]; |
| 30 | lgroupi++; |
| 31 | } else if(lgroups.indexOf(legendGroup) === -1) { |
| 32 | lgroups.push(legendGroup); |
| 33 | hasOneNonBlankGroup = true; |
| 34 | lgroupToTraces[legendGroup] = [legendItem]; |
| 35 | } else { |
| 36 | lgroupToTraces[legendGroup].push(legendItem); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | // build an { legendgroup: [cd0, cd0], ... } object |
| 41 | for(i = 0; i < calcdata.length; i++) { |
no outgoing calls
no test coverage detected
searching dependent graphs…