code: function make_tree_axis(series) {
      let ylabels = series.map(s => s.name.split(","));
      let ytop = {name: null, depth: 0, categories: []};
      let maxdepth = ylabels[0].length;
  
      for (let i = 0; i < ylabels.length; ++i) {
          let ylabel = ylabels[i];
          let parent = ytop;
  
          for (let depth = 0; depth < ylabel.length; ++depth) {
              let label = ylabel[depth];
              if (depth === maxdepth - 1) {
                  parent.categories.push(label);
              } else {
                  let l = parent.categories.length;
                  if (l > 0 && parent.categories[l - 1].name == label) {
                      parent = parent.categories[l - 1];
                  } else {
                      let cat = {name: label, depth: depth + 1, categories: []};
                      parent.categories.push(cat);
                      parent = cat;
                  }
              }
          }
      }
      return ytop;
  }
docs: ****************************************************************************
  
  XYZ