@Override
	public String getSVG( HashMap<String, Double> chartMetrics, HashMap<String, Object> axisMetrics, ChartSeries s )
	{
		double w = chartMetrics.get( "w" );
		double h = chartMetrics.get( "h" );
		double max = chartMetrics.get( "max" );
		double min = chartMetrics.get( "min" );
		Object[] categories = s.getCategories();
		ArrayList series = s.getSeriesValues();
		String[] seriescolors = s.getSeriesBarColors();
		String[] legends = s.getLegends();
		StringBuffer svg = new StringBuffer();
		if( series.size() == 0 )
		{
			log.error( "DoughnutChart.getSVG: error in series" );
			return "";
		}
		int[] dls = getDataLabelInts(); // get array of data labels (can be specific per series ...)
		boolean threeD = isThreeD();
		final int LABELOFFSET = 15;

		int n = series.size();
		double centerx = 0.0;
		double centery = 0.0;
		double radius = 0.0;
		double radiusy = 0.0;
		centerx = w / 2 + chartMetrics.get( "x" );
		centery = h / 2 + chartMetrics.get( "y" );
		if( threeD )
		{
			svg.append( "<defs>\r\n" );
			svg.append( "<filter id=\"multiply\">\r\n" );
			svg.append( "<feBlend mode=\"multiply\" in2=\"\"/>\r\n" );
			svg.append( "</filter>\r\n" );
			svg.append( "</defs>\r\n" );
		}
		svg.append( "<g>\r\n" );

		//radius= Math.min(w, h)/2.3;	// should take up almost entire w/h of chart  		
		radius = Math.min( w, h ) / 1.9;    // should take up almost entire w/h of chart
		double r0 = (radius / 2) / n;    // radius/2 to account for hole
		double r = radius;    // start at outside and work inside
		for( int i = n - 1; i >= 0; i-- )
		{    // for each series
			double[] curseries = (double[]) series.get( i );        // series data points
			double total = 0.0;
			for( double cursery : curseries )
			{    // get total in order to calculate percentages
				total += cursery;
			}
			if( dls.length == 1 )
			{    // no seriess-specific data labels; expand to entire series for loop below
				int dl = dls[0];
				dls = new int[curseries.length];
				for( int z = 0; z < dls.length; z++ )
				{
					dls[z] = dl;
				}
			}
			svg.append( "<circle " + getScript( "" ) + " cx='" + centerx + "' cy='" + centery + "' r='" + r + "' " + getStrokeSVG( 2,
			                                                                                                                       getDarkColor() ) + " fill='none'/>\r\n" );
			double x = centerx + r;
			double y = centery;
			String path = "";
			double percentage = 0;
			double lasta = 0;
			int largearcflag = 0;
			int sweepflag = 0;
			// Now create each pie wedge according to it's percentage value 
			for( int j = 0; j < curseries.length; j++ )
			{
				percentage = curseries[j] / total;
				double angle = (percentage * 360) + lasta;
				double x1 = centerx + (r * (Math.cos( Math.toRadians( angle ) )));
				double y1 = centery - (r * (Math.sin( Math.toRadians( angle ) )));
				if( (percentage * 360) > 180 )
				{
					sweepflag = 0;
					largearcflag = 1;
				}
				else
				{
					largearcflag = 0;
				}
				path = "M" + centerx + " " + centery + " L" + x + " " + y + " A" + r + " " + r + " 0 " + largearcflag + " " + sweepflag + " " + x1 + " " + y1 + " L" + centerx + " " + centery + "Z";
				// paint wedge of color to center of chart -- the inner will overwrite so don't have to worry about segments and arcs, etc
				svg.append( "<path  " + getScript( "" ) + "  fill='" + seriescolors[j] + "'   id='series_" + (j + 1) + "' fill-opacity='" + getFillOpacity() + "' " + getStrokeSVG() + " path='' d='" + path + "' fill-rule='evenodd'/>\r\n" );
				// data labels
				String l = getSVGDataLabels( dls, axisMetrics, curseries[j], percentage, j, legends, categories[j].toString() );
				if( l != null )
				{
					double halfa = ((percentage / 2) * 360) + lasta;    // center in area
					double x2 = centerx + ((r - (r0 / 2)) * (Math.cos( Math.toRadians( halfa ) )));
					double y2 = centery - ((r - (r0 / 2)) * (Math.sin( Math.toRadians( halfa ) )));
					svg.append( "<text x='" + (x2) + "' y='" + (y2) + "' vertical-align='bottom' " + getDataLabelFontSVG() + " style='text-anchor: middle;'>" + l + "</text>\r\n" );
				}
				lasta = angle;
				x = x1;
				y = y1;
			}    // each point in current series
			r -= r0;
		}    // each series
		// complete inner circle & create "hole"
		svg.append( "<circle " + getScript( "" ) + " cx='" + centerx + "' cy='" + centery + "' r='" + r + "' " + getStrokeSVG( 2,
		                                                                                                                       getDarkColor() ) + " fill='white'/>\r\n" );
		svg.append( "</g>\r\n" );

		return svg.toString();
	}