[flexcoders] Indicate events on line chart that is time based:

2007-04-25 Thread Zhu Haifeng
Hey, I am trying to produce a line chart that has labels at points at
which special events occurred. For example, I have a query result with
dates as x-axis and stock prices as y-axis, and another field of 0s
and 1s which indicate if there is a dividend happened on that day.
What I want is a small label right beside that data point on those
days where there is dividend, or some markup on the data point itself
to distinguish it from the others on the chart. Here is an example
from Yahoo finance:

http://finance.yahoo.com/charts#chart4:symbol=gs;range=1y;indicator=dividend+volume;charttype=candlestick;crosshair=on;logscale=on;source=undefined

Could someone give me some hints on how to achieve that? Flex's plot
chart does not seem to do it...


Thanks,
Colin




[flexcoders] Re: Identifying line series for datatip function

2007-04-22 Thread Zhu Haifeng
Hi I'm having the same problem here, but I still haven't figured out
how to deal with it.

After calling LineSeries(h.element).yField, I got the name of the data
series, which is great. But how do I then retrieve the y value of this
data series for the datatip?

For example, I get "DATE" after calling LineSeries(h.element).yField,
and the conventional way to display the y value in the datatip is to
do h.item.DATE. How do I attach "DATE" to h.item.?

Thanks a lot 


--- In flexcoders@yahoogroups.com, "yaagcur" <[EMAIL PROTECTED]> wrote:
>
> Thanks v much
> That set me on the correct path
> 
> --- In flexcoders@yahoogroups.com, "pasflex"  wrote:
> >
> > try
> > trace (LineSeries(h.element).yField)
> > 
> > --- In flexcoders@yahoogroups.com, "yaagcur"  wrote:
> > >
> > > To elaborate I want to do something like
> > > 
> > > public function dtFunc(h:HitData):String {
> > >   
> > >   trace (h.chartItem.element.yField);
> > > 
> > > }
> > > but there is no property yField
> > > 
> > > You used to be able to do
> > > obj.hitData.chartItem.element.yField
> > > 
> > > but I think that is no longer available and the chartItemEvent also
> > > has not proven the answer to date
> > > 
> > > 
> > > --- In flexcoders@yahoogroups.com, "yaagcur"  wrote:
> > > >
> > > > On a line chart with multiple series, I wish to have a datatip
> > > > function that differs according to which line is hit but I'm 
> > having
> > > > difficulty identifying the property that would tell me that
> > > > Any help much appreciated
> > > >
> > >
> >
>




[flexcoders] Datatip date scaling problem:

2007-04-16 Thread Zhu Haifeng
Hi,

I am trying to plot a simple scalable line chart with date as x-axis and
some value as y-axis. I used DateTimeAxis for the x-axis and it is able
to nicely scale the labels to fit the axis width when I scale the data
range. However, as the label rescales, so does the date in the datatip:
therefore I get the dates of many data points to be the same...

For example, as I make the range larger, the axis label becomes Jan 06,
Feb 06, etc., instead of each consecutive date - which is fine. However,
the date of the datatip for that entire month also becomes Jan 06
instead of each individual date. Is there anyway I can correct this?
Below is my code: