views:

437

answers:

2

Hi community,

does someone know how to add a watermark to a charting component in flex? Maybe to a Line Chart or just simple to a canvas.

Thanks in advance

Sebastian

+1  A: 

Try making the background of the chart transparent (backgroundAlpha: 0), then wrap them both in a canvas, and put your watermark behind the chart

<mx:Canvas><mx:Image/><mx:Chart/></mx:Canvas>

Sean Clark Hess
thanks I'll try it =)
Xelluloid
+1  A: 

You can manipulate backgroundElements of your chart, for example

<fx:Declarations>

 <fx:Array id="backgroundContents">

   <mx:Image source="../assets/texture.jpg" />

   <mx:GridLines id="backgroundGrid" />

   <mx:GridLines id="anotherLayer" />

   <s:Label />

 </fx:Array>

</fx:Declarations>

<PlotChart id="plot2"  showDataTips="true" dataProvider="{dataProvider}" backgroundElements="{backgroundContents}"></PlotChart>
Vik Gamov