if(negativeSeriesColors != null)
writer.write(",negativeSeriesColors:[\"#" + negativeSeriesColors.replaceAll("[ ]*,[ ]*", "\",\"#") + "\"]");
if(legendPosition != null) {
LegendPlacement legendPlacement = model.getLegendPlacement();
writer.write(",legendPosition:\"" + legendPosition + "\"");
if(model.getLegendCols() != 0)
writer.write(",legendCols:" + model.getLegendCols());