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