Create a custom component extending UIComponent and override the updateDisplayList method and use your code inside that method.
On Mon, Nov 3, 2014 at 11:08 PM, mark goldin [via Apache Flex Users] < [email protected]> wrote: > Is it possible? I need to draw a line on the background. > > My code: > <mx:annotationElements> > <mx:CartesianDataCanvas id="canvas" includeInRanges="true"> > </mx:CartesianDataCanvas> > </mx:annotationElements> > > > var _line:UIComponent = new UIComponent(); > _line.graphics.lineStyle(5); > _line.graphics.moveTo(0, 60); > _line.graphics.lineTo(100, 60); > canvas.addChild(_line); > > No error, no line. > > Thanks > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://apache-flex-users.2333346.n4.nabble.com/adding-a-line-to-CartesianDataCanvas-tp8571.html > To unsubscribe from Apache Flex Users, click here > <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU0MTcyMzE2NA==> > . > NAML > <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- *Regards,* Prashant Kumar* | *Mob.: +91 8408811225 -- View this message in context: http://apache-flex-users.2333346.n4.nabble.com/adding-a-line-to-CartesianDataCanvas-tp8571p8575.html Sent from the Apache Flex Users mailing list archive at Nabble.com.
