public JSONObject asJson() {
		JSONObject obj = new JSONObject();
		if (minValue != null) {
			obj.put("min", new JSONNumber(minValue));
		}
		if (maxValue != null) {
			obj.put("max", new JSONNumber(maxValue));
		}
		if (decimalPrecision != null) {
			obj.put("tickDecimals", new JSONNumber(decimalPrecision));
		}
		if(isTimeAxis)
		{
			obj.put("mode", new JSONString("time"));
			obj.put("timeformat", new JSONString(timeFormat));
			JSONArray minTickSize = new JSONArray();
			minTickSize.set(0, new JSONNumber(minTickLength));
			minTickSize.set(1, new JSONString(this.minTickUnit.asString()));
			obj.put("minTickSize", minTickSize);
		}
		else
		{
			obj.put("minTickSize", new JSONNumber(minTickLength));
		}
		if(axisMapping != null)
		{
			JSONArray ticks = new JSONArray();
			
			int i = 0;
			for(Integer k : axisMapping.keySet())
			{
				JSONArray t = new JSONArray();
				t.set(0, new JSONNumber(k));
				t.set(1, new JSONString(axisMapping.get(k)));
				ticks.set(i++, t);
			}
			
			obj.put("ticks", ticks);
			
		}
		if (__formatter__ != null) {
			JSONObject formatterFuncObj = new JSONObject(__formatter__);
			obj.put("tickFormatter", formatterFuncObj);
		}
		
		if (__transform__ != null && __inverseTransform__ != null) {
			
			JSONObject transformObj = new JSONObject(__transform__);
			JSONObject inverseTransformObj = new JSONObject(__inverseTransform__);
			obj.put("transform", transformObj);
			obj.put("inverseTransform", inverseTransformObj);
		}
		return obj;

	}