1 Reply Latest reply on Oct 9, 2008 2:28 PM by bradwood.com

    Custom LineSeries can't get category data

    bradwood.com
      Ok, I'm kind of wandering aimlessly here, but I didn't get any help to speak of in my first post ( http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1397584&enterthread=y)

      Suffice it to say I am playing with a custom LineSeries class which I want to be able to change how the renderer behaves based on the lineseriesitems being rendered in combination with the category data. If you really must know why, read the original thread linked to above.

      At first I thought it would be easy (hah!) because the updateDisplayList method of my custom LineRenderer class receives an array of LineSeriesItems which have an xValue property. Unfortunately, these xValue properties have already had the labelfunction applied to them. In my case, I need the original values being used by my category axes since they are a date, and my labelfunction for the xAxis is returning a string which cannot be readily converted back into a usable date for the sake of date comparison.

      Next, I though I would attempt to access the dataProvider of the horizontalAxis directly in my custom LineSeries constructor since it is part of the LineSeries super class. Unfortunatley, the horizonalAxis property is null at the time the LineSeries object is created. Probably because the data has not been bound to the chart yet.

      So now I am back at square one: I need to find a way for my LineRenderer class to access the actual x value for the corresponding data point to decide how to render it.

      To give an example: I want my logic to go something like, "If the corresponding xAxis date is <= today, draw a solid line, otherwise, if the corresponding xAxis date is > today, draw a dotted line.

      Please advise and hopefully I haven't been too confusing.
        • 1. Re: Custom LineSeries can't get category data
          bradwood.com Level 1
          Ok, good news. IT turns out one of my base assumptions here turned out to be misinformed.

          When I said, "these xValue properties have already had the labelfunction applied to them" I was wrong. It turns out some test data I was using was confusing me. I am in fact able to get the original xValue out of my LineSeriesItem object. I assume what I want to do will be possible now. I will update the thread I mentioned in my original post if I am successful.