求救:当form为step时,LineChart最右边的竖线只能显示半边。

Mr傅 2012-03-18 06:23:01
不知道在哪里上传图片,哪位大大运行一下下面的代码看一下效果吧,实在是搞不明白了。

<?xml version="1.0"?>
<!-- Simple example to demonstrate the LineChart and AreaChart controls. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Script>
<![CDATA[
import mx.events.FlexEvent;

import mx.collections.ArrayCollection;
import flash.external.ExternalInterface;
import mx.controls.Alert;
import r1.deval.D;

[Bindable]
private var expensesAC:ArrayCollection=new ArrayCollection([{Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450}, {Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600}, {Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300}, {Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900}, {Month: "May", Profit: 2400, Expenses: 575, Amount: 500}]);
]]>
</mx:Script>
<mx:SolidColor id="sc2"
color="red"
alpha=".3"/>
<mx:Stroke id="s2"
color="red"
weight="2"
caps="square"
pixelHinting="true"/>


<mx:Panel title="LineChart and AreaChart Controls Example"
height="100%"
width="100%"
layout="horizontal">

<mx:LineChart id="linechart"
height="100%"
width="45%"
paddingLeft="5"
paddingRight="5"
showDataTips="true"
dataProvider="{expensesAC}">

<mx:horizontalAxis>
<mx:CategoryAxis categoryField="Month"/>
</mx:horizontalAxis>

<mx:series>
<mx:LineSeries yField="Expenses"
form="step"
displayName="Expenses"
lineStroke="{s2}"/>
</mx:series>
</mx:LineChart>
<mx:Legend dataProvider="{linechart}"/>
</mx:Panel>
</mx:Application>
...全文
72 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

4,328

社区成员

发帖
与我相关
我的任务
社区描述
多媒体/设计 Flex
社区管理员
  • Flex
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧