Bug 141248 Script: Set axis title background color, axis title can be covered.
Script: Set axis title background color, axis title can be covered. Steps: 1.Create a bar chart 2.Script:function beforeDrawAxisTitle(axis, title, scriptContext) { importPackage(Packages.org.eclipse.birt.chart.model.attribute); importPackage(Packages.org.eclipse.birt.chart.model.attribute.impl); { if (axis.getType() == AxisType.LINEAR_LITERAL) title.setVisible(false);} title.getCaption().getColor( ).set( 208, 32, 0); title.getCaption().getFont().setItalic(true); title.getCaption().getFont().setRotation(30); title.getCaption().getFont().setStrikethrough(true); title.getCaption().getFont().setSize(14); title.getCaption().getFont().setName("Arial"); title.getOutline().setVisible(true); title.getOutline().setThickness(3); title.setBackground(ColorDefinitionImpl.ORANGE()); } 3.Preview Actual Results: 1.Axis title can be covered Expected Results: 1.Axis title is visible.
chart/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGGraphics2D.java
elem.appendChild( startColor );
		Element endColor = dom.createElement( "stop" ); 
		endColor.setAttribute( "offset", "100%" ); 
		endColor.setAttribute( "stop-color", serializeToString( paint.getColor2( ) ) ); 
		elem.appendChild( endColor );
		return elem;
	}
	protected Element createLine( double arg0, double arg1, double arg2,
			double arg3 )
	{
		Element elem = createElement( "line" ); 
		elem.setAttribute( "x1", Double.toString( arg0 ) ); 
		elem.setAttribute( "y1", Double.toString( arg1 ) ); 
		elem.setAttribute( "x2", Double.toString( arg2 ) ); 
		elem.setAttribute( "y2", Double.toString( arg3 ) ); 
		return elem;
	}
	protected Element createShape( Shape shape )
	{
		PathIterator pathIter = shape.getPathIterator( null );
		String pathStr = ""; 
		while ( !pathIter.isDone( ) )
		{
			double[] points = new double[6];
			int TYPE = pathIter.currentSegment( points );
			switch ( TYPE )
			{
				case PathIterator.SEG_CLOSE :
					pathStr += " Z"; 
					break;