Link to home
Start Free TrialLog in
Avatar of weesiong
weesiong

asked on

Urgent: Look for Line Chart

Hi All,

I am looking a flash line chart in flash 5. Where can i got it? The value already have store in the flash and no need special create the txt or xml to get the data.

And i need it support in 2 pie chart....... thanks.
Avatar of elhy
elhy

hmm...perhaps you want to try looking into macromedia site and see if there are such component.

http://dynamic.macromedia.com/bin/MM/exchange/main.jsp?product=flash
Avatar of weesiong

ASKER

elhy,

I have found few component in there already, but these no what i want. :(

Best Regards,
Wee Siong
Take a look at http://www.globfx.com/

They have flash-software for creating charts ;-)
i can help u with the code for simple line & pie chat, if u can get a copy of MX to compile the swf... it is quite easy to draw it urself, any style any color ...

if u have to pay for some charting componenst,... maybe u should consider upgrading ur flash 1st :)

cheers
wow ... just did a search for u too ...

here u can find code for doing pie chart dynamically, but u will have to round off the % to integer, it is using a slice of "1%", ie: 36degree - and use duplicateMovieclip to do the whole pie ...

http://actionscript-toolbox.com/samplepiechart.php

i suppose line chart is easy too, create a movieclip with just a line - long enough - and use the same method, duplicateMovie, rotation and lenght and arrange the line segment at the right position.

with MX ... what u can do, user MoveTo(x,y), lineTo(x,y), curveTo() ... etc to draw items and fill color too :)
much easier i think

cheers
here's a line chart for u ...
don't know where i got it from ...

http://www.smartclever.net/example/flash/linechart/linechart.zip
henryww,

Thanks the comment, the link http://actionscript-toolbox.com/samplepiechart.php actually it is a pie chart and what i wanted is a line chart.

For the link http://www.smartclever.net/example/flash/linechart/linechart.zip It can work now, but if i want 2 lines chart, it cannot work, can you help me modify it, i am still newsbabis in the flash action script. Thanks.

Best Regards,
Wee Siong
"And i need it support in 2 pie chart....... "
i thought u want 2 pie charts too ...

sure, i can add an extra chart to it ...
so u want it side by side? or one after one?

are u from singapore or malaysia?

cheers
henryww,

I need it side by side. :)

I am work in singapore, but i am malaysian, How you know it?

Thank!

Best Regards,
Wee Siong

hi wee siong,...

well, ur name sounds like it ... malaysian .. :)
yeah got a few friends there ... one of my IT manager went back to KL a few month ago ...

anyway ... ok, i am still at work, so it will some time around 8-9 pm GMT +8 if that's ok with u :)

cheers
sorry, was a bit busy at work... still at the office ...
anyway ... it's done.

change the data.xml for the values of the 2 charts http://www.smartclever.net/example/flash/linechart/linechartv2.zip

if u want to change the style, line, width, etc, u need to go to a friend or someone who has MX and change from the fla, compile again for the swf ... once it is done, u can just upload the swf with the xml or as the comment given in the fla, using chart.swf?DataUrl=abc.asp with abc.asp
if u are going to generate the xml from a database.

cheers
Hi hentyww,

thanks the code, it really so nice, but can you help me do a one after one line chart. I will add other points to you. Thanks.

Best Regards,
Wee Siong
henryww,

Where you from?
henryww,

Where you from?
sorry ... weesiong,

i don't understand... one after one line chart, do u mean show 1 first then stop and goto the next one? how long do u have to stop? or u want a button to go to the next chart

i am in HK

cheers
henryww,

The chart what i want is compile 2 lines in 1 chart. The previous version you sent to me is show in 2 chart. Can you help me, thanks.

Best Regards,
Wee Siong
ok i see ...
so the same chart with 2 lines ...

no problem ... give me a while
but .. .when u have 2 lines on the same chart...
what about the title and numbers?
do u need the numbers for each point on the chart??

it depends on ur data, it might crosss each other and the labels are overlapping ...
henryww,

Yes, i need the title, and x and y bar got the title, because have more 30 points in the chart, if put the number in each point, it will look no good.

Thanks so much :)

Best Regards,
Wee Siong
ok ... so 2 lines, no points labels, 1 title, and axis labels are needed ... right?
YES! Correct!
ASKER CERTIFIED SOLUTION
Avatar of henryww
henryww

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
is that ok??
henryww,

It is cool and very nice and it is what i wanted. Thank you so much!

Best Regards,
Wee Siong
hi henryww,

Got some problem again, because the value you are get from XML file, if i want get from an Array

exp:

var FieldName = new Array;
FieldName = Array("1", "2", "3");
var FieldValue = new Array;
FieldValue = Array(10000, 12000, 15000);

if change it in your code will be hard or not?

I will add other points for you, thanks :)

Best Regards,
Wee Siong
ok so u have 2 arrays?
fieldName and fieldValue ... what about the second set of values?

say fieldName for both set
fieldValue1 & fieldValue2 in arrays for the 2 sets of numbers ... ok?

it will take some time, but i don't think that's too hard, it is easier than xml :)

let me know.

cheers
henryww,

Ok, no problem. Thanks!

Best Regards,
Wee Siong
so i will only put some dummy data in the fla, i guess u have someone to open the fla and change the values right ...

give me a while i am a little busy at work, ... shouldn't be too long ...
henryww,

Sure no problem. Thanks for your help.

Best Regards,
Wee Siong
http://www.smartclever.net/example/flash/linechart/linechartv4.zip

done ...change everything u need in frame one
a few arrays were added for extra info like line colors etc ...

cheers weesiong
henryww,

Thank for the line chart it really so nice.

I've post the points in
https://www.experts-exchange.com/questions/20542031/Point-for-henryww.html

Please take your points in there.

And my colleagues got some problem in flash, can you to help him.

Thanks.

Best Regards,
Wee Siong
yes sure ...

post ur questions in Q_20542031.html :)
that's clearer & easy to start from beginning again ...

thanks weesiong