<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flex Examples &#187; barWidthRatio</title>
	<atom:link href="http://blog.flexexamples.com/tag/barwidthratio/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Changing the bar width ratio on a Flex Bar Chart</title>
		<link>http://blog.flexexamples.com/2007/10/15/changing-the-bar-width-ratio-on-a-flex-bar-chart/</link>
		<comments>http://blog.flexexamples.com/2007/10/15/changing-the-bar-width-ratio-on-a-flex-bar-chart/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 15:02:22 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[BarChart]]></category>
		<category><![CDATA[Charting]]></category>
		<category><![CDATA[barWidthRatio]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/15/changing-the-bar-width-ratio-on-a-flex-bar-chart/</guid>
		<description><![CDATA[<p>The following example shows how you can change the barWidthRatio style to control how wide each bar is in relation to the category width.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/BarChart_barWidthRatio_test/main.mxml">View MXML</a></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2007/10/15/changing-the-bar-width-ratio-on-a-flex-bar-chart/ --&#62; &#60;mx:Application name=&#34;BarChart_barWidthRatio_test&#34; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34; layout=&#34;vertical&#34; verticalAlign=&#34;middle&#34; backgroundColor=&#34;white&#34;&#62; &#160; &#60;mx:ArrayCollection id=&#34;arrColl&#34;&#62; &#60;mx:source&#62; &#60;mx:Array&#62; &#60;mx:Object name=&#34;R Winn&#34; obp=&#34;.353&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can change the <code>barWidthRatio</code> style to control how wide each bar is in relation to the category width.</p>
<p>Full code after the jump.</p>
<p><span id="more-237"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/BarChart_barWidthRatio_test/main.mxml">View MXML</a></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2007/10/15/changing-the-bar-width-ratio-on-a-flex-bar-chart/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;BarChart_barWidthRatio_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ArrayCollection</span> id=<span style="color: #ff0000;">&quot;arrColl&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:source</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Array</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> name=<span style="color: #ff0000;">&quot;R Winn&quot;</span> obp=<span style="color: #ff0000;">&quot;.353&quot;</span> slg=<span style="color: #ff0000;">&quot;.445&quot;</span> avg=<span style="color: #ff0000;">&quot;.300&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> name=<span style="color: #ff0000;">&quot;P Feliz&quot;</span> obp=<span style="color: #ff0000;">&quot;.290&quot;</span> slg=<span style="color: #ff0000;">&quot;.418&quot;</span> avg=<span style="color: #ff0000;">&quot;.253&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> name=<span style="color: #ff0000;">&quot;O Vizquel&quot;</span> obp=<span style="color: #ff0000;">&quot;.305&quot;</span> slg=<span style="color: #ff0000;">&quot;.316&quot;</span> avg=<span style="color: #ff0000;">&quot;.246&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> name=<span style="color: #ff0000;">&quot;B Molina&quot;</span> obp=<span style="color: #ff0000;">&quot;.298&quot;</span> slg=<span style="color: #ff0000;">&quot;.433&quot;</span> avg=<span style="color: #ff0000;">&quot;.276&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> name=<span style="color: #ff0000;">&quot;R Durham&quot;</span> obp=<span style="color: #ff0000;">&quot;.295&quot;</span> slg=<span style="color: #ff0000;">&quot;.343&quot;</span> avg=<span style="color: #ff0000;">&quot;.218&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Array</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:source</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ArrayCollection</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;barWidthRatio:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HSlider</span> id=<span style="color: #ff0000;">&quot;slider&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;0.0&quot;</span></span>
<span style="color: #000000;">                        maximum=<span style="color: #ff0000;">&quot;1.0&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;0.6&quot;</span></span>
<span style="color: #000000;">                        liveDragging=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        tickInterval=<span style="color: #ff0000;">&quot;0.1&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
     <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:BarChart</span> id=<span style="color: #ff0000;">&quot;barChart&quot;</span></span>
<span style="color: #000000;">             showDataTips=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">             dataProvider=<span style="color: #ff0000;">&quot;{arrColl}&quot;</span></span>
<span style="color: #000000;">             width=<span style="color: #ff0000;">&quot;100%&quot;</span></span>
<span style="color: #000000;">             height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:verticalAxis</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CategoryAxis</span> categoryField=<span style="color: #ff0000;">&quot;name&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:verticalAxis</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:series</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:BarSeries</span> id=<span style="color: #ff0000;">&quot;barSeries&quot;</span></span>
<span style="color: #000000;">                    yField=<span style="color: #ff0000;">&quot;name&quot;</span></span>
<span style="color: #000000;">                    xField=<span style="color: #ff0000;">&quot;avg&quot;</span></span>
<span style="color: #000000;">                    displayName=<span style="color: #ff0000;">&quot;avg&quot;</span></span>
<span style="color: #000000;">                    barWidthRatio=<span style="color: #ff0000;">&quot;{slider.value}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:series</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:BarChart</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/BarChart_barWidthRatio_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/BarChart_barWidthRatio_test/bin/main.html" width="100%" height="400"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing the bar width ratio on a Flex Bar Chart on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/10/15/changing-the-bar-width-ratio-on-a-flex-bar-chart/',contentID: 'post-237',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'barWidthRatio',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/10/15/changing-the-bar-width-ratio-on-a-flex-bar-chart/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

