Add own watermark to flex chart

自作多情 提交于 2019-12-11 17:08:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!