Apache flex 如何更改图表中的背景线颜色?

Apache flex 如何更改图表中的背景线颜色?,apache-flex,charts,flex3,Apache Flex,Charts,Flex3,我似乎不知道如何在折线图中更改背景水平(和垂直)线颜色。以下是我目前掌握的情况: <mx:LineChart width="100%" height="100%" dataProvider="{dataSet}"> <mx:series> <mx:LineSeries showDataEffect="{eff}" yField="x" /> </mx:series> </mx:LineChart>

我似乎不知道如何在折线图中更改背景水平(和垂直)线颜色。以下是我目前掌握的情况:

<mx:LineChart width="100%" height="100%" dataProvider="{dataSet}">
    <mx:series>
        <mx:LineSeries showDataEffect="{eff}" yField="x" />
    </mx:series>
</mx:LineChart> 


我想出来了。在图表的“背景元素”属性中定义GridLines对象,如下所示:

<mx:LineChart width="100%" height="100%" dataProvider="{dataSet}">

    <mx:backgroundElements>
        <mx:GridLines gridDirection="both"/>
    </mx:backgroundElements>

</mx:LineChart>