Drawing On Chart But It's Disappearing

Advertisement
I created a column chart and added an annotation element to it:
[code]
<mx:annotationElements>
        <mx:CartesianDataCanvas id="chartCanvas"/>
</mx:annotationElements>
[/code]
I added a creation complete method to draw on the canvas. The following function is called on creationComplete.
[code]  
protected function drawSteps():void
       trace("chartCanvas.width is: " + chartCanvas.width);
      chartCanvas.graphics.lineStyle(1, 0x000000, 0.5);
      chartCanvas.graphics.beginFill(0xd4e3f0, 0.5);
      chartCanvas.graphics.moveTo(chartCanvas.width/2, yAxisMax);
      chartCanvas.graphics.lineTo(chartCanvas.width/2, 0);
      chartCanvas.graphics.endFill();
[/code]
This works fine when the chart first loads but if I update the chart series the line goes away. I have added a call to the 'drawSteps()' function in my method that updates the chart series as well but it didn't work. I don't understand why changing the chart series would cause this to stop displaying though, especially considering I call it again when the series is changed. Can anyone help?
Advertisement

Replay

Other things may be drawn into the graphics object, and those things might clear what is there first.  It might be better to draw by overriding updateDisplayList()

Openoffice spreadsheet draw combination charts  programatically

hi all, we need to develop a project that is an extension in OO so that it could display a mutitype chart we have drawn in Excel. Essentially, we have a combination chart consists of a candle stick chart and a line chart appearing together. OO could

HT4901 info i had previously input has disappeared form my ical on the iphone4s. When i turned on my computer it was still in ical there but it also disappeared after i connected the iPhone in iTunes. Please help me get all my info in ical back

info i had previously input has disappeared form my ical on the iphone4s. When i turned on my computer it was still in ical there but it also disappeared after i connected the iPhone in iTunes. Please help me get all my info in ical back!Have you tri

I rented a movie on my iPad. It began to download but then it disappeared. The movie appears in my rented videos, but when I click it, it says, "video rented but not downloaded. Go to downloads to manage downloads". Where did my downloads go?

I rented a movie on my iPad. It began to download but then it disappeared. I freed up a ton of storage space to make sure I had the room for it. The movie appears in my rented videos, but when I click it, it says, "video rented but not downloaded. Go

Hi, I am trying to blur the background in Prem Pro CC I have made a mask using the free draw bezier tool but it does not track forward.  What am I doing wrong?

Hi, I am trying to blur the background in Prem Pro CC I have made a mask using the free draw bezier tool but it does not track forward.  What am I doing wrong?Hi Kevin I found a YouTube clip explaining how to blur the background with free draw bezier

I want to restore a back up from icloud from last year but it has disappeared! can i recover older backups?

I want to restore a back up from icloud from last year but it has disappeared! can i recover older backups?No, once removed, backups cannot be recovered.  Also, Apple will remove backups after 180 days of inactivity, which sounds like what happened h

I have a Macbook Pro (2009) and the tool bar in Safari keeps disappearing. There's a small diagonal arrow on the upper right that I can click and the bar will appear temporarily, but then it disappears from view. "Hide Toolbar" is greyed out in VIEW

My 2009 Macbook Pro's Safari doesn't show the tool bar anymore.  I can click on a diagonal arrow in the upper right corner that appears when I put my cursor there and the tool bar will show, but then it disappears again.  Also, when I get an email an

Is there a way to display the legend for a chart, but not the chart?

Hi, I have a stacked column chart and a line chart on top of each other.   I can't use the legend for the stacked column chart because the data will change from month to month, and the 2 charts will not be aligned.  I copied the stacked column chart

I previously had safari as a brouser and had saved many favourites but it all disappeared one day and I have not been able install safari again can you help.

I previously had safari as a brouser and had saved many favourites saved for quick brousing.  Safari disappeared and I have been unable to reinstall it after numerous attempts.  How do I proceed to get safari back?Ok, Anne. Get the eye fixed first. F

Package or component to draw candle charts in j2me ??

hi all, I want a package or component API to draw candle stick charts. best regards, ahmedDefault drawing functions in lcdui are enough to draw charts manually, or u can search google for 3'rd party implemantation.Read other 2 answers

I updated my appleid and email but my purchases disappeared?

I recently updated my apple id and email via these instructions for managing my account: http://support.apple.com/kb/HT5621 But now all my previous purchases have disappeared as if it were a new account (but it isn't, i just "updated" the detail

Y50-70 Touch Display issues but then mysteriously disappeared?

Hi, I brought a Y50 Touch to the Philippines for two weeks. At first everything seemed fine and then one day I woke up to the display not functioning. I knew it couldn't have been a software issue because it was happening at from system startup. Afte

Team members see projects, sprints, code, burndown chart, but cannot see backlog items (not even the tasks assigned to them)

I have a VS Online account (http://tec.visualstudio.com), I created it with my [email protected] ID, now I want to use it for the projects at the university I work for. My work ID is [email protected], and my jobmates use others... The University has

How to draw Line Chart in SAP?

There is a request that the customer want to see Line Chart in the report. Is it possible to do it using abap? Thank you very much.Hi, Yes it is possible. GOto Tcode SE83>Expand graphics node>double click on that you will get all graphic programs.Re

I have tried over & over to download Firefox but it just disappears every time before I'm able to complete the process--can't get the icon onto my laptop!

I'm just trying to add firefox to use to access internet besides explorer, but can't complete the processBingo. Thank you! I encoded them in "Apple lossless" when I originally uploaded. Among other things, the files were huge - I'd never noticed

Since upgrading to Mountain Lion, I cannot restore emails with time machine. In Lion TM created a folder in Mail called recovered emails(or similar) No such folder is created since ML. I am able to see the email I want to restore, but it then disappears

Since upgrading to Mountain Lion, I cannot restore emails with time machine. In Lion TM created a folder in Mail called recovered emails(or similar) No such folder is created since ML. I am able to see the email I want to restore, but it then disappe

Iphone music manually managed but music now disappeared

I plugged my iphone into my laptop as usually, transferred a song that I purchased. I ejected the phone as normal then when i went to close itunes it was completely frozen. I had to restart my computer. Then upon checking the songs on my iphone there

How do I get the ringtones back that I paid for and had downloaded but then they disappeared?

I Bought ringtones and assigned them to contacts and as my default ringer and then they were gone, how do I get them back?If you haven't already done so then try updating to iOS 8.1.2, that includes : http://support.apple.com/kb/DL1758 This release i

Powerpivot charting: Trying to create a chart in PowerPivot but it creates a table instead.

I do click the ICON for charting but the application seems to ignore the request and creates the table instead.  I have uninstalled and reinstalled several times but it has not made a difference.Hello, Please take a look at the following articles to

All but 3 contacts and some pics disappeared from my iphone 4. I am getting pics of people I don't know showing up now. Help?!

I had my phone stolen last month and had it immediately shut off and flagged as stolen. Redid passwords also. I have my son's old iphone 4 and had my info transferred to it. Verizon was able to switch it over and all my contacts and pics showed up. N