else{  final Chart cmDT = _iun.getDesignTimeModel( ); Object designObject  = null;  if (getElementFromSource( src,	StructureType.TITLE ) != null){ designObject = cmDT.getTitle(); } else if (getElementFromSource( src,	StructureType.CHART_BLOCK ) != null){ designObject = cmDT.getBlock(); } if (designObject != null){ String jsFunction = null; switch( type ) { case ActionType.TOGGLE_VISIBILITY: jsFunction = "toggleVisibility(evt, "; break; case ActionType.HIGHLIGHT: jsFunction = "highlight(evt, "; break; } if ( jsFunction == null ) { assert false; return; }   List components = (List) componentPrimitives.get( designObject );  Iterator iter = null;  if ( components != null) { String groupIdentifier = String.valueOf( designObject.hashCode( ) ); StringBuffer sb = new StringBuffer( ); sb.append( groupIdentifier );  sb.append( ",new Array(" ); iter = components.iterator( ); appendArguments( sb, iter );  sb.append( ")" );  elm.setAttribute( scriptEvent, jsFunction + sb.toString( ) + ")" );  if ( tg.getCondition( ).getValue( ) == TriggerCondition.ONMOUSEOVER ) { elm.setAttribute( "onmouseout", jsFunction + sb.toString( ) + ")" ); } setCursor( elm ); } }  }
	private void addJSCodeOnElement( StructureSource src, Trigger tg, Element elm, String scriptEvent, int type )	{		final Series seRT = (Series) getElementFromSource( src,				StructureType.SERIES );		if ( seRT != null )		{			Series seDT = null;			String groupIdentifier = null;						// Create Group identifiers. Differs for color by categories or series			if ( isColoredByCategories( ) )			{				seDT = findCategorySeries( seRT );				final int baseIndex = ( (DataPointHints) src.getSource( ) ).getIndex( );				StringBuffer sb = new StringBuffer( );				sb.append( "'" );//$NON-NLS-1$				sb.append( seDT.hashCode( ) );				sb.append( "index" ); //$NON-NLS-1$				sb.append( baseIndex );				sb.append( "'" );//$NON-NLS-1$				groupIdentifier = sb.toString( );			}			else			{				try				{					seDT = findDesignTimeSeries( seRT );				}				catch ( ChartException e )				{					logger.log( e );					return;				}					groupIdentifier = String.valueOf( seDT.hashCode( ) );			}			boolean includeLabels = false;			boolean includeGraphics = false;						String jsFunction = null;			switch( type )			{				case ActionType.TOGGLE_VISIBILITY:					jsFunction = "toggleVisibility(evt, ";					includeLabels = true;					includeGraphics = true;					break;				case ActionType.TOGGLE_DATA_POINT_VISIBILITY:					jsFunction = "toggleLabelsVisibility(evt, ";					includeLabels = true;					includeGraphics = false;					break;				case ActionType.HIGHLIGHT:					jsFunction = "highlight(evt, ";					includeLabels = true;					includeGraphics = true;					break;			}			if ( jsFunction == null )			{				assert false;				return;			}			if ( includeGraphics || includeLabels )			{				StringBuffer sb = new StringBuffer( );				sb.append( groupIdentifier );								sb.append( ",new Array(" ); //$NON-NLS-1$							List labelComponents = (List) labelPrimitives.get( seDT );				List components = (List) componentPrimitives.get( seDT );									Iterator iter = null;				// Apply action to graphics				if ( includeGraphics  && components != null)				{					iter = components.iterator( );					appendArguments( sb, iter );						if ( includeLabels && labelComponents != null )					{						sb.append( "), new Array(" ); //$NON-NLS-1$					}				}				// Apply action to labels 				if ( includeLabels && labelComponents != null)				{					iter = labelComponents.iterator( );					appendArguments( sb, iter );				}															sb.append( ")" ); //$NON-NLS-1$								elm.setAttribute( scriptEvent, //$NON-NLS-1$								  jsFunction 								+ sb.toString( )								+ ")" ); //$NON-NLS-1$										if ( tg.getCondition( ).getValue( ) == TriggerCondition.ONMOUSEOVER )				{					elm.setAttribute( "onmouseout", //$NON-NLS-1$									jsFunction 									+ sb.toString( )									+ ")" ); //$NON-NLS-1$						}				setCursor( elm );			}		}	}