changes type json param into plot