Hello all,
I’m looking for a very simple solution to map 7 points on a graph (last week’s stats). All I need is a line (red) that is drawn using 9 points (first and last points aren’t labeled, as they are outside of the date’s focus and are there to give some visual continuity to the line). On top or under each point there should be a label (green) that has 2 strings: day and stats number. The vertical axis should be from 0 to 1300 (if you can’t see the following pic, I also attached it below):
The closest thing I found was this script here
http://www.actionscript.org/forums/showthread.php3?p=687982
var anaPreLineX:Array = new Array("110","120","130","140","150","160","170","180","190","200","210","220","230","240","250","260","270","280","290","300","310","320","330","340","350","360","370","380","390","400","410","420","430","440","450","460","470","480","490");
var anaPreLineY:Array = new Array("342.4","332.4","332.4","342.4","352.4","342.4","352.4","342.4","332.4","342.4","352.4","362.4","362.4","352.4","342.4","352.4","352.4","342.4","332.4","322.4","312.4","322.4","322.4","312.4","322.4","312.4","322.4","332.4","322.4","312.4","322.4","312.4","322.4","332.4","332.4","322.4","312.4","302.4","292.4");
for(i=1;i<anaPreLineX.length;i++){
_root.createEmptyMovieClip("line"+i, 100+i);
_root["line"+i].lineStyle(2, 0x000000, 100);
_root["line"+i].moveTo(anaPreLineX[i-1], anaPreLineY[i-1]);
_root["line"+i].lineTo(anaPreLineX*, anaPreLineY*);
}
problem is, the above uses pixel coordinates instead of direct numbers mapped on a 0-1300 vertical axis, and it doesn’t have a label for each point. I’d be grateful if anyone could mod that or come up with something else. Thanks.