|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
664 bytes
|
| Line | |
|---|
| 1 | import { getStackSeriesIdentifier } from '../../../util/stacks/getStackSeriesIdentifier';
|
|---|
| 2 | export var combineStackedData = (stackGroups, barSettings) => {
|
|---|
| 3 | var stackSeriesIdentifier = getStackSeriesIdentifier(barSettings);
|
|---|
| 4 | if (!stackGroups || stackSeriesIdentifier == null || barSettings == null) {
|
|---|
| 5 | return undefined;
|
|---|
| 6 | }
|
|---|
| 7 | var {
|
|---|
| 8 | stackId
|
|---|
| 9 | } = barSettings;
|
|---|
| 10 | if (stackId == null) {
|
|---|
| 11 | return undefined;
|
|---|
| 12 | }
|
|---|
| 13 | var stackGroup = stackGroups[stackId];
|
|---|
| 14 | if (!stackGroup) {
|
|---|
| 15 | return undefined;
|
|---|
| 16 | }
|
|---|
| 17 | var {
|
|---|
| 18 | stackedData
|
|---|
| 19 | } = stackGroup;
|
|---|
| 20 | if (!stackedData) {
|
|---|
| 21 | return undefined;
|
|---|
| 22 | }
|
|---|
| 23 | return stackedData.find(sd => sd.key === stackSeriesIdentifier);
|
|---|
| 24 | }; |
|---|
Note:
See
TracBrowser
for help on using the repository browser.