The following example shows how you can rotate the vertical and horizontal axis renderer’s label by setting the labelRotation style.
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/10/15/rotating-labels-in-a-flex-chart-axis-using-the-labelrotation-style/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Style>
@font-face {
src: local("Arial");
font-family: EmbeddedArial;
}
BarChart {
font-family: EmbeddedArial;
}
</mx:Style>
<mx:ArrayCollection id="arrColl">
<mx:source>
<mx:Array>
<mx:Object name="R Winn" obp=".353" slg=".445" avg=".300" />
<mx:Object name="P Feliz" obp=".290" slg=".418" avg=".253" />
<mx:Object name="O Vizquel" obp=".305" slg=".316" avg=".246" />
<mx:Object name="B Molina" obp=".298" slg=".433" avg=".276" />
<mx:Object name="R Durham" obp=".295" slg=".343" avg=".218" />
</mx:Array>
</mx:source>
</mx:ArrayCollection>
<mx:ApplicationControlBar dock="true">
<mx:Form>
<mx:FormHeading label="labelRotation" />
<mx:FormItem label="horizontalAxisRenderer:">
<mx:HSlider id="horizontalLabelRotation"
minimum="-90"
maximum="90"
value="0"
liveDragging="true"
snapInterval="10"
tickInterval="10" />
</mx:FormItem>
<mx:FormItem label="verticalAxisRenderer:">
<mx:HSlider id="verticalLabelRotation"
minimum="-90"
maximum="90"
value="0"
liveDragging="true"
snapInterval="10"
tickInterval="10" />
</mx:FormItem>
</mx:Form>
<mx:Spacer width="100%" />
<mx:Legend dataProvider="{barChart}"/>
</mx:ApplicationControlBar>
<mx:BarChart id="barChart"
showDataTips="true"
dataProvider="{arrColl}"
width="100%"
height="100%">
<!-- vertical axis -->
<mx:verticalAxis>
<mx:CategoryAxis categoryField="name" title="Player"/>
</mx:verticalAxis>
<!-- vertical axis renderer -->
<mx:verticalAxisRenderer>
<mx:AxisRenderer labelRotation="{verticalLabelRotation.value}" />
</mx:verticalAxisRenderer>
<!-- horizontal axis renderer -->
<mx:horizontalAxisRenderer>
<mx:AxisRenderer labelRotation="{horizontalLabelRotation.value}" />
</mx:horizontalAxisRenderer>
<!-- series -->
<mx:series>
<mx:BarSeries id="obpSeries"
yField="name"
xField="obp"
displayName="obp" />
<mx:BarSeries id="slgSeries"
yField="name"
xField="slg"
displayName="slg" />
<mx:BarSeries id="avgSeries"
yField="name"
xField="avg"
displayName="avg" />
</mx:series>
</mx:BarChart>
</mx:Application>
关键属性就是labelRotation.
分享到:
相关推荐
在本项目中,“Creating a Rotating Shape Using Javascript.zip”是一个基于JavaScript实现的有趣游戏或交互式应用程序,旨在展示如何利用JavaScript来创建一个旋转图形。这个压缩包包含了一个名为“html5_rotate”...
在CFD(计算流体动力学)分析中,网格生成是至关重要的一步,对于FLUENT旋转机械分析而言尤其如此。网格质量直接影响着模拟结果的准确性和计算效率。G/Turbo是一款专为GAMBIT设计的自动化工具,用于涡轮机械的预处理...
4. There is one rotating triangle floating in the air, casting a shadow on the table, walls and other objects. 5. The program allows the user to move the viewpoint and view direction.
Once you’ve understood the basics, you’ll move on to Modeling of a Segway, running a robot control system using deep reinforcement learning, and building a handwritten digit recognition model in ...
E7240X E7240FX Rotating Anode X-ray Tube Assembly
13.3 Computing F given the homography induced by a plane 334 13.4 The infinite homography H∞ 338 13.5 Closure 340 14 Affine Epipolar Geometry 344 14.1 Affine epipolar geometry 344 14.2 The affine ...
Once you’ve understood the basics, you’ll move on to Modeling of a Segway, running a robot control system using deep reinforcement learning, and building a handwritten digit recognition model in ...
This article introduces ... In addition to reviewing how to use the control, we will also see how certain aspects of it were implemented. ContentControl3D is part of the Thriple project on CodePlex.com.
To run the code in this book, the reader will need a Linux operating system or Microsoft Windows, and some way of downloading Python, the Python Imaging Library, and Inkscape from the internet. All ...
In addition to the pure material transport, it can also cooperate with the requirements of the technological process in the production process of various industrial enterprises to form a rhythmic ...
To create a basic actor, you can use the "Add New Actor" button in the toolbar or right-click in the viewport and select "Add Actor." Actors can be customized using the Details panel. ##### Objects,...
模型 of the main circuit of APF in d-q rotating coordinate system, the inverse system method is adopted to decouple it into a pseudo-linear system. Then, a controller is designed based on Linear ...
In this study, the novel dish concentrator features a rotating array of identical curved mirror units, which could be either parabolic or spherical in shape. This design eliminates the issue of ...
- **Education and Research**: Using MATLAB for educational purposes and research in the field of computer vision. - **Medical Imaging**: Processing medical images such as X-rays, MRIs, and CT scans ...