Shape prevClip = _g2d.getClip( );
	public void enableInteraction( InteractionEvent ie ) throws ChartException	{		Trigger[] triggers = ie.getTriggers( );		if ( triggers == null )		{			return;		}		///////////////////////////////////////////////		//Create the hotspot and add the hotspot on 		//the SVG hotspot layer		///////////////////////////////////////////////		final PrimitiveRenderEvent pre = ie.getHotSpot( );		Element elm = null;		if ( pre instanceof PolygonRenderEvent )		{			final Location[] loa = ( (PolygonRenderEvent) pre ).getPoints( );			int[][] pa = getCoordinatesAsInts( loa );			elm = svggc.createPolygon( pa[0], pa[1], pa[0].length );		}		else if ( pre instanceof OvalRenderEvent )		{			final Bounds boEllipse = ( (OvalRenderEvent) pre ).getBounds( );			elm = svggc.createOval( boEllipse.getLeft( ),					boEllipse.getTop( ),					boEllipse.getWidth( ),					boEllipse.getHeight( ) );		}		else if ( pre instanceof ArcRenderEvent )		{			final ArcRenderEvent are = (ArcRenderEvent) pre;						if ( are.getInnerRadius( ) >= 0					&& are.getOuterRadius( ) > 0					&& are.getInnerRadius( ) < are.getOuterRadius( ) )			{				Shape outerArc = new Arc2D.Double( are.getTopLeft( ).getX( )						+ ( are.getWidth( ) - 2 * are.getOuterRadius( ) )						/ 2,						are.getTopLeft( ).getY( )								+ ( are.getHeight( ) - 2 * are.getOuterRadius( ) )								/ 2,						2 * are.getOuterRadius( ),						2 * are.getOuterRadius( ),						are.getStartAngle( ),						are.getAngleExtent( ),						Arc2D.PIE );				Shape innerArc = new Arc2D.Double( are.getTopLeft( ).getX( )						+ ( are.getWidth( ) - 2 * are.getInnerRadius( ) )						/ 2,						are.getTopLeft( ).getY( )								+ ( are.getHeight( ) - 2 * are.getInnerRadius( ) )								/ 2,						2 * are.getInnerRadius( ),						2 * are.getInnerRadius( ),						are.getStartAngle( ),						are.getAngleExtent( ),						Arc2D.PIE );				Area fArea = new Area( outerArc );				fArea.exclusiveOr( new Area( innerArc ) );				Shape prevClip = _g2d.getClip( );//				_g2d.setClip( fArea );				elm = svggc.createGeneralPath( fArea );//				_g2d.setClip( prevClip );			}			else			{				elm = svggc.createGeneralPath( new Arc2D.Double( are.getTopLeft( ).getX( ),						are.getTopLeft( ).getY( ),						are.getWidth( ),						are.getHeight( ),						are.getStartAngle( ),						are.getAngleExtent( ),						toSwingArcType( are.getStyle( ) ) ) );			}					}				//////////////////////////////////////		//Add event handling to the hotspot		//////////////////////////////////////				if (elm != null) {			for (int x = 0; x < triggers.length; x++) {				Trigger tg = triggers[x];								switch (tg.getAction().getType().getValue()) {				case ActionType.SHOW_TOOLTIP:					Element title = svggc.dom.createElement("title"); //$NON-NLS-1$					title.appendChild(svggc.dom							.createTextNode(((TooltipValue) tg.getAction()									.getValue()).getText()));					elm.appendChild(title);					elm.setAttribute("onmouseout", "TM.remove()"); //$NON-NLS-1$ //$NON-NLS-2$					elm.setAttribute("onmouseover", "TM.show(evt)"); //$NON-NLS-1$ //$NON-NLS-2$							break;				case ActionType.URL_REDIRECT:					elm.setAttribute("onmousedown", //$NON-NLS-1$							"parent.location='" //$NON-NLS-1$									+ ((URLValue) tg.getAction().getValue())											.getBaseUrl() + "'"); //$NON-NLS-1$					setCursor(elm);					break;				case ActionType.TOGGLE_VISIBILITY :										final StructureSource src = (StructureSource) ie.getSource( );					if ( src.getType( ) == StructureType.SERIES )					{						final Series seRT = (Series) src.getSource( );											logger.log( ILogger.INFORMATION,								Messages.getString( "info.toggle.visibility", //$NON-NLS-1$										getLocale() )										+ seRT );						Series seDT = null;						try						{							// THE							// CORRESPONDING							// DESIGN-TIME							// SERIES														seDT = findDesignTimeSeries( seRT ); // LOCATE							List components = (List)componentPrimitives.get(seDT);							Iterator iter = components.iterator();							StringBuffer sb = new StringBuffer();							sb.append(seDT.hashCode());							if (iter.hasNext())								sb.append(",new Array(");							 //$NON-NLS-1$							while (iter.hasNext()){								sb.append("'").append(iter.next()).append("'"); //$NON-NLS-1$ //$NON-NLS-2$								if (iter.hasNext())									sb.append(","); //$NON-NLS-1$							}							if (components.size() > 0)								sb.append(")"); //$NON-NLS-1$							elm.setAttribute("onmousedown", //$NON-NLS-1$									"toggleVisibility(evt, " //$NON-NLS-1$											+ sb.toString() + ")"); //$NON-NLS-1$														setCursor(elm);							//should define style class and set the visibility to visible							((SVGGraphics2D)_g2d).addCSSStyle(".class"+seDT.hashCode(), "visibility", "visible"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$						}						catch ( ChartException oosx )						{							logger.log( oosx );							return;						}					}					break;														}			}			hotspotLayer.appendChild( elm );		}			}