答案 0 :(得分:1)
var sprite:Sprite = new Sprite();
drawChart([ [0,50], [70, 100], [120, 190] ], sprite);
private function drawChart(data:Array, sprite:Sprite):void {
var grachics:Graphics = sprite.graphics;
grachics.beginFill(0xffff00);
for (var i:int = 0; i < data.length; i++) {
var obj:Array = data[i] as Array;
var startX:int = obj[0];
var endX:int = obj[1];
grachics.drawRect(startX, 0, endX - startX, 30);
}
graphics.endFill();
}