[flex] 如何对画出不同城市的不同时间点的报警个数的linechart

jrunner 2011-03-02

数据源如下。四个城市的3个时间点的报警个数。想画出4条线形图。横轴是时间,纵轴是报警个数。一条曲线代表一个地区。求解。
             11:00        12:00              13:00
北京         2              4                   6
天津         3               5                   5
上海         4               6                   4
成都         5              7                   3
将数据读入后形势大概如下,然后如何画这4条根据地区描绘的曲线呢?

                        private var expensesAC:ArrayCollection = new ArrayCollection( [
                                { Time: "11:00", Profit: 2,City:"beijing" },
                                { Time: "11:00", Profit: 3 ,City:"上海"},
                                { Time: "11:00", Profit: 4 ,City:"天津"},
                                { Time: "11:00", Profit: 5,City:"成都" },
                                { Time: "12:00", Profit: 4,City:"beijing" },
                                { Time: "12:00", Profit: 5 ,City:"上海"},
                                { Time: "12:00", Profit: 6 ,City:"天津"},
                                { Time: "12:00", Profit: 7,City:"成都" },
                                { Time: "13:00", Profit: 6,City:"beijing" },
                                { Time: "13:00", Profit: 5 ,City:"上海"},
                                { Time: "13:00", Profit: 4 ,City:"天津"},
                                { Time: "13:00", Profit: 3,City:"成都" }]);
Global site tag (gtag.js) - Google Analytics