public JSONObject getJSON( ChartSeriesHandle[] series, WorkBookHandle wbh, Double[] minMax ) throws JSONException
	{
		JSONObject chartObjectJSON = new JSONObject();
		// Type JSON
		chartObjectJSON.put( "type", getTypeJSON() );

		// Series
		double yMax = 0.0;
		double yMin = 0.0;
		int nSeries = 0;
		JSONArray seriesJSON = new JSONArray();
		JSONArray seriesCOLORS = new JSONArray();
		try
		{
			for( ChartSeriesHandle sery : series )
			{
				JSONArray seriesvals = CellRange.getValuesAsJSON( sery.getSeriesRange(), wbh );
				// must trap min and max for axis tick and units
				double sum = 0.0;    // for area-type charts, ymax is the sum of all points in same series
				nSeries = Math.max( nSeries, seriesvals.length() );
				for( int j = 0; j < seriesvals.length(); j++ )
				{
					try
					{
						sum += seriesvals.getDouble( j );
						yMax = Math.max( yMax, sum );
						yMin = Math.min( yMin, seriesvals.getDouble( j ) );
					}
					catch( NumberFormatException n )
					{
						;
					}
				}
				seriesJSON.put( seriesvals );
				seriesCOLORS.put( FormatConstants.SVGCOLORSTRINGS[sery.getSeriesColor()] );
			}
			chartObjectJSON.put( "Series", seriesJSON );
			chartObjectJSON.put( "SeriesFills", seriesCOLORS );
		}
		catch( JSONException je )
		{
			// TODO: Log error
		}
		minMax[0] = yMin;
		minMax[1] = yMax;
		minMax[2] = (double) nSeries;
		return chartObjectJSON;

	}