            for (stateName in chart) {              currentState = chart[stateName];              if (parentId) {                  stateId = parentId + '.' + stateName;              } else {                  stateId = stateName;              }                