docs: public String encode() throws IOException {
          FastStringWriter fsw = new FastStringWriter();
  
          try {
              ChartUtils.writeDataValue(fsw, "offset", this.offset, false);
              ChartUtils.writeDataValue(fsw, "position", this.position, true);
              ChartUtils.writeDataValue(fsw, "id", this.id, true);
              ChartUtils.writeDataValue(fsw, "stacked", this.stacked, true);
  
              if (this.gridLines != null) {
                  fsw.write(",\"gridLines\":" + this.gridLines.encode());
              }
  
              if (this.scaleLabel != null) {
                  fsw.write(",\"scaleLabel\":" + this.scaleLabel.encode());
              }
          }
          finally {
              fsw.close();
          }
  
          return fsw.toString();
      }