code: public Series setType(SeriesType type) {
          if(type != null) {
              this.type = type.name().toLowerCase();
          } else {
              this.type = null;
          }
          return this;
      }
docs: The type of series
  @param type the type to set
  @return