0
我有一個使用DateTimeAxis作爲x軸和爲其定義的呈現器的圖表。我也爲軸上的標籤定義了一個函數,但我無法獲取標籤顯示。Flex DateTimeAxis未顯示標籤
試圖打印出一個靜態時間來測試工作。
private function timeAxisLabelFunction(obj1:Object, obj2:Object, axis:IAxis):String
{
return "9:30AM";
}
<mx:AreaChart
id="alertVolumeChart"
width="100%"
height="100%"
dataProvider="{volumes}"
showDataTips="true" >
<mx:horizontalAxis>
<mx:DateTimeAxis id="xAxis"
dataUnits="minutes"
baseAtZero="false"
alignLabelsToUnits="false"
interval="8"
minorTickInterval="1"
labelFunction="timeAxisLabelFunction"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
<mx:AxisRenderer
id="hAxisRenderer" canDropLabels="false"
axis="{xAxis}" showLabels="true"
labelFunction="timeRendererLabelFunction"
minorTickLength="8" minorTickPlacement="outside"
tickLength="20" tickPlacement="outside"
labelAlign="right" labelGap="4"
tickStroke="{timeStroke}" minorTickStroke="{timeStroke}" axisStroke="{timeStroke}" >
</mx:AxisRenderer>
</mx:horizontalAxisRenderers>
<mx:series>
<mx:AreaSeries
yField="value" xField="time">
</mx:AreaSeries>
</mx:series>
</mx:AreaChart>
更新:
很顯然,我是用犯規支持在渲染中使用的字體樣式的字體系列。不確定它的風格屬性是什麼。