Google Finance with Flex Code
So here's the code as I promised. There is still a minor bug I'm going to work out with the range drag to the extreme right, and will repost with updated code once fixed. But for now, enjoy.
Samples Index - Right click for source

(443) Error: Type was not found or was not a compile-time constant: DateTimeAxis.
(563) Error: Type was not found or was not a compile-time constant: CartesianChart.
(696) Error: Type was not found or was not a compile-time constant: CartesianChart.
Anybody having an idea what I'm missing?
Anyways, thanks for this great component!
Thanks.
Cyril
Sorry for the late reply. If you'll be resizing the component dynamically, just make sure you reset the ratio value that's used to calculate (on resize) the difference between the HDividedBox width and the length of your data array.... that should do the trick :-)
Really looking forward for that "extreme right" bug fix.
Thank you :)
Like, you want a period of 6 months from Now, and not a period of 6 months counting backward from the end date isn't it?
Thanks!
when you call moveSlider, just change the leftIndicator for rightIndicator, and instead of subtracting the number of days, just add them :)
Anyways, even in the original example, that "5d 1m 6m" control produces some unexpected results.
Anyways, it's allways a GREAT Help and I thank you again Brendan for making my day a lot easier!
I was playing around with it and have increased the dataset to 10 years with only monthly breakup. By doing so, I found that its not correctly showing the axis also in many axis text is getting overlayed on each other. Please provide us guidance on this topic.
"error retrieving xml data"
Directory structure of swf file is at same leve of data folder.
What is missing?!!! can anybody give me suggestion. Thank you brendan for your excellent work.
Yes, the items getting overlaid is an issue if you have a lot of data, but can be tweaked easily inside the custom renderer in order to reduce the number of labels displayed, or maybe rotating the text to fit more... it's really up to you on how to handle that.
I've been looking over the code but there's so many functions and variables that I can't seem to just remove the new HSlider and import it into your original graphing component.
Thanks!
TypeError: Error #1034: Type Coercion failed: cannot convert mx.charts.chartClasses::LegendData@293db309 to mx.charts.ChartItem.
at skins::ColumnSeriesCustomRenderer/set data()
at mx.charts::LegendItem/set legendData()
at mx.charts::Legend/::addLegendItem()
at mx.charts::Legend/::populateFromArray()
at mx.charts::Legend/mx.charts:Legend::commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/::validateProperties()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()
Any idea of why that may be happening? I tried messing around with set data to figure it out in the renderer, but couldn't figure out what to do. If you have time to look into it, I'd really appreciate it. Thanks!
I'm just debugging this error, though, I suspects its a Flex 3 issue. Any chance you could confirm?
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.charts::AxisRenderer/private::measureTitle()
at mx.charts::AxisRenderer/mx.charts:AxisRenderer::measure()
at mx.core::UIComponent/private::measureSizes()
at mx.core::UIComponent/validateSize()
at mx.managers::LayoutManager/private::validateSize()
at mx.managers::LayoutManager/private::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/private::callLaterDispatcher2()
at mx.core::UIComponent/private::callLaterDispatcher()
at [renderEvent]
Thanks
i can't run it in flex 3.
thaks!!
I was just wondering how you can retrieve data from MySQL using php script instead of .xml. Could you help me with it ??
Thanks.
I built the project with Flex Builder 3 and getting an error while mouse over the main area.
Any comments? Thanks,
Alex
vReferenceError: Error #1069: Property showRenderer not found on mx.core.UITextField and there is no default value.
at ff2/getChartDataPoint()[/Users/alexvarshavsky/Documents/Flex Builder 3/ff2/src/ff2.mxml:651]
at ff2/__mainChart_mouseMove()[/Users/alexvarshavsky/Documents/Flex Builder 3/ff2/src/ff2.mxml:48]
The error below seems to relate to the showRenderer method inside the custom line or column renderer (inside the skins folder i believe). showRenderer gets called on the children of the series, and i believe the ordering is different in the Flex3 components for chart series. I'd try debugging the app putting breakpoints where showRenderer is getting called on the mouseover events on the chart, and see if you can determine the children of the series that it's getting called on.
Hope that helps for now... let me know if you can't get it fixed (or if you can too!) and I'll have a look into it.
[Style] must annotate a class.
And it goes to the FillStyles.as file
Any ideas?
the charts you have developed are mind blowing. i an new to this blog and also to flex, so can you please help me how to download your code and run it.
On "Google Finance " can add synbol, it can compare symbols. But in demo only a symbol. Brendan help ...
could you give an example to generate the swf, like the code or script that use to run this library
Thanks
great example. To Alex's problem (Error #1069: Property showRenderer not found on mx.core.UITextField and there is no default value.):
If you remove the custom method showRenderer in skins/LineSeriesCustomRenderer the error disappears for me.
regarding error : "vReferenceError: Error #1069: Property showRenderer not found on mx.core.UITextField and there is no default value.
".
One such solution is to replace
"mainChart.series[0].getChildAt(i + 1).showRenderer(false);"
with
"mainChart.series[0].getChildAt(i + 1).alpha = 0 ;"
AND
"mainChart.series[0].getChildAt(i + 1).showRenderer(true);"
with
"mainChart.series[0].getChildAt(i + 1).alpha = 1;"
"error retrieving xml data"
though swf file is created after compile. does any have had this issue please let me know
However, I tried to use the annotation feature in my charting example but it was not working. The reason being that I added the series dynamically. Dont know how that changes anything but it just doesnt work.
http://www11.asphost4free.com/hairstyleeesddvsdv/c...
http://www11.asphost4free.com/hairstyleeesddvsdv/m...
http://www11.asphost4free.com/hairstyleeesddvsdv/p...
http://www11.asphost4free.com/hairstyleeesddvsdv/r...
http://www11.asphost4free.com/hairstyleeesddvsdv/s...
http://www11.asphost4free.com/hairstyleeesddvsdv/s...
http://www11.asphost4free.com/hairstyleeesddvsdv/b...
http://www11.asphost4free.com/hairstyleeesddvsdv/n...
http://www11.asphost4free.com/hairstyleeesddvsdv/n...
http://www.propeller.com/member/cheapnelson
http://groups.google.com/group/zoloft-buy