问题
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:
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>
回答2:
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>
来源:https://stackoverflow.com/questions/1192463/add-own-watermark-to-flex-chart