我想构建一个 LineChart 组件,其中线条的颜色指示值的高低。我应该能够只使用渐变笔划(见下文)进行此购买,但由于某种原因,渐变仅从左到右,并且“角度”属性被忽略。我怎么能这样做?
<mx:PlotChart id="bpChart" width="514" height="144" dataProvider="{measurementsXLC}" >
<mx:series>
<mx:LineSeries id="bpSeries" displayName="Series 1" yField="value" xField="date" showDataEffect="fade" stroke="{lstroke}">
<mx:lineStroke>
<mx:LinearGradientStroke angle="270.0" weight="3" scaleMode="vertical" >
<mx:entries>
<mx:GradientEntry color="#ff0000" ratio="0.0"/>
<mx:GradientEntry color="#00ff00" ratio="1.0"/>
</mx:entries>
</mx:LinearGradientStroke>
</mx:lineStroke>
<mx:itemRenderer>
<mx:Component>
<mx:CircleItemRenderer >
</mx:CircleItemRenderer>
</mx:Component>
</mx:itemRenderer>
</mx:LineSeries>
<mx:LineSeries id="bpSeries2" displayName="Series 1" yField="value2" xField="date" showDataEffect="fade" />
</mx:series>
<mx:horizontalAxis>
<mx:DateTimeAxis id="dateAxis" dataUnits="milliseconds" labelUnits="days" />
</mx:horizontalAxis>
<mx:verticalAxis>
<mx:LinearAxis baseAtZero="false" autoAdjust="true" interval="5" />
</mx:verticalAxis>
</mx:PlotChart>