<?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; LineSeries</title>
	<atom:link href="http://blog.flexexamples.com/category/lineseries/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 default line colors in a Flex LineChart control</title>
		<link>http://blog.flexexamples.com/2007/11/13/changing-default-line-colors-in-a-flex-linechart-control/</link>
		<comments>http://blog.flexexamples.com/2007/11/13/changing-default-line-colors-in-a-flex-linechart-control/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 16:06:35 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Charting]]></category>
		<category><![CDATA[LineSeries]]></category>
		<category><![CDATA[StyleManager]]></category>
		<category><![CDATA[getColorName()]]></category>
		<category><![CDATA[lineStroke]]></category>
		<category><![CDATA[stroke]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/13/changing-default-line-colors-in-a-flex-linechart-control/</guid>
		<description><![CDATA[<p>The following example shows how you can change the line colors in a LineChart in Flex by setting the lineStroke style in MXML or ActionScript, as seen in the following snippets:</p> <p>MXML:</p> &#60;mx:LineSeries id="closeSeries" yField="@close" form="curve" displayName="Close"&#62; &#60;mx:lineStroke&#62; &#60;mx:Stroke color="haloGreen" weight="2" alpha="0.6" /&#62; &#60;/mx:lineStroke&#62; &#60;/mx:LineSeries&#62; <p>ActionScript:</p> &#60;mx:LineSeries id="closeSeries" yField="@close" form="curve" displayName="Close" /&#62; ... closeSeries.setStyle("lineStroke", new [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can change the line colors in a LineChart in Flex by setting the lineStroke style in MXML or ActionScript, as seen in the following snippets:</p>
<p>MXML:</p>
<pre class="code">
&lt;mx:LineSeries id="closeSeries" yField="@close" form="curve" displayName="Close"&gt;
    &lt;mx:lineStroke&gt;
        &lt;mx:Stroke color="haloGreen" weight="2" alpha="0.6" /&gt;
    &lt;/mx:lineStroke&gt;
&lt;/mx:LineSeries&gt;
</pre>
<p>ActionScript:</p>
<pre class="code">
&lt;mx:LineSeries id="closeSeries" yField="@close" form="curve" displayName="Close" /&gt;
...
closeSeries.setStyle("lineStroke", new Stroke(0xFF0000, 2, 0.4));
</pre>
<p>Full code after the jump.</p>
<p><span id="more-294"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/LineSeries_lineStroke_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/11/13/changing-default-line-colors-in-a-flex-linechart-control/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.styles.StyleManager;
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:XMLListCollection id="dp"&gt;
        &lt;mx:source&gt;
            &lt;mx:XMLList&gt;
                &lt;quote date="8/27/2007" open="40.38" close="40.81" /&gt;
                &lt;quote date="8/24/2007" open="40.5" close="40.41" /&gt;
                &lt;quote date="8/23/2007" open="40.82" close="40.6" /&gt;
                &lt;quote date="8/22/2007" open="40.4" close="40.77" /&gt;
                &lt;quote date="8/21/2007" open="40.41" close="40.13" /&gt;
                &lt;quote date="8/20/2007" open="40.55" close="40.74" /&gt;
                &lt;quote date="8/17/2007" open="40.18" close="40.32" /&gt;
                &lt;quote date="8/16/2007" open="39.83" close="39.96" /&gt;
                &lt;quote date="8/15/2007" open="40.22" close="40.18" /&gt;
                &lt;quote date="8/14/2007" open="41.01" close="40.41" /&gt;
                &lt;quote date="8/13/2007" open="41" close="40.83" /&gt;
                &lt;quote date="8/10/2007" open="41.3" close="41.06" /&gt;
                &lt;quote date="8/9/2007" open="39.9" close="40.75" /&gt;
                &lt;quote date="8/8/2007" open="39.61" close="40.23" /&gt;
                &lt;quote date="8/7/2007" open="39.08" close="39.42" /&gt;
                &lt;quote date="8/6/2007" open="38.71" close="39.38" /&gt;
                &lt;quote date="8/3/2007" open="39.47" close="38.75" /&gt;
                &lt;quote date="8/2/2007" open="39.4" close="39.52" /&gt;
                &lt;quote date="8/1/2007" open="40.29" close="39.58" /&gt;
            &lt;/mx:XMLList&gt;
        &lt;/mx:source&gt;
    &lt;/mx:XMLListCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="0xFF0000" click="closeSeries.setStyle('lineStroke', new Stroke(0xFF0000, 2, 0.4));" /&gt;
        &lt;mx:Button label="0xFF00FF" click="closeSeries.setStyle('lineStroke', new Stroke(0xFF00FF, 2, 1.0));" /&gt;
        &lt;mx:Button label="haloSilver" click="closeSeries.setStyle('lineStroke', new Stroke(StyleManager.getColorName('haloSilver'), 2, 1.0));" /&gt;

        &lt;mx:Spacer width="100%" /&gt;

        &lt;mx:Legend dataProvider="{lineChart}" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:LineChart id="lineChart"
            showDataTips="true"
            dataProvider="{dp}"
            width="100%"
            height="100%"&gt;

        &lt;!-- series filters --&gt;
        &lt;mx:seriesFilters&gt;
            &lt;mx:Array /&gt;
        &lt;/mx:seriesFilters&gt;

        &lt;!-- vertical axis --&gt;
        &lt;mx:verticalAxis&gt;
            &lt;mx:LinearAxis baseAtZero="false" title="Price" /&gt;
        &lt;/mx:verticalAxis&gt;

        &lt;!-- horizontal axis --&gt;
        &lt;mx:horizontalAxis&gt;
            &lt;mx:CategoryAxis id="ca" categoryField="@date" title="Date" /&gt;
        &lt;/mx:horizontalAxis&gt;

        &lt;!-- horizontal axis renderer --&gt;
        &lt;mx:horizontalAxisRenderers&gt;
            &lt;mx:AxisRenderer axis="{ca}" canDropLabels="true" /&gt;
        &lt;/mx:horizontalAxisRenderers&gt;

        &lt;!-- series --&gt;
        &lt;mx:series&gt;
            &lt;mx:LineSeries id="closeSeries" yField="@close" form="curve" displayName="Close"&gt;
                &lt;mx:lineStroke&gt;
                    &lt;mx:Stroke color="haloGreen" weight="2" alpha="0.6" /&gt;
                &lt;/mx:lineStroke&gt;
            &lt;/mx:LineSeries&gt;
            &lt;mx:LineSeries yField="@open" form="curve" displayName="Open"&gt;
                &lt;mx:lineStroke&gt;
                    &lt;mx:Stroke color="haloOrange" weight="2" alpha="0.6" /&gt;
                &lt;/mx:lineStroke&gt;
            &lt;/mx:LineSeries&gt;
        &lt;/mx:series&gt;
    &lt;/mx:LineChart&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/LineSeries_lineStroke_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/LineSeries_lineStroke_test/bin/main.html" width="100%" height="500"></iframe></p>
<p>When setting a stroke in ActionScript, note that you must pass the stroke color as a numeric value (like 0xFF0000), not as a color name (like &#8220;red&#8221;):</p>
<pre class="code">
closeSeries.setStyle("lineStroke", new Stroke(0xFF0000, 2, 0.4));
</pre>
<p>If you want to use a named color, you can use the static StyleManager.getColorName() method, as shown in the following snippet:</p>
<pre class="code">
closeSeries.setStyle("lineStroke", new Stroke(StyleManager.getColorName("red"), 2, 1.0));
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing default line colors in a Flex LineChart control on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/11/13/changing-default-line-colors-in-a-flex-linechart-control/',contentID: 'post-294',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'getColorName(),lineStroke,stroke',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/11/13/changing-default-line-colors-in-a-flex-linechart-control/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Removing the default drop shadow from a LineChart chart in Flex</title>
		<link>http://blog.flexexamples.com/2007/11/13/removing-the-default-drop-shadow-from-a-linechart-chart-in-flex/</link>
		<comments>http://blog.flexexamples.com/2007/11/13/removing-the-default-drop-shadow-from-a-linechart-chart-in-flex/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 07:16:30 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Charting]]></category>
		<category><![CDATA[LineSeries]]></category>
		<category><![CDATA[seriesFilters]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/13/removing-the-default-drop-shadow-from-a-linechart-chart-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can remove the default drop shadow from a LineChart chart in Flex by setting the seriesFilters property, as seen in the following snippets:</p> &#60;mx:LineChart id=&#34;lineChart&#34; showDataTips=&#34;true&#34; dataProvider=&#34;{dp}&#34; width=&#34;100%&#34; height=&#34;100%&#34; seriesFilters=&#34;[]&#34;&#62; &#60;!-- . . . --&#62; &#60;/mx:LineChart&#62; &#60;mx:LineChart id=&#34;lineChart&#34; showDataTips=&#34;true&#34; dataProvider=&#34;{dp}&#34; width=&#34;100%&#34; height=&#34;100%&#34;&#62; &#60;!-- series filters --&#62; &#60;mx:seriesFilters&#62; &#60;mx:Array /&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can remove the default drop shadow from a LineChart chart in Flex by setting the <code>seriesFilters</code> property, as seen in the following snippets:</p>
<pre class="code">
&lt;mx:LineChart id=&quot;lineChart&quot;
        showDataTips=&quot;true&quot;
        dataProvider=&quot;{dp}&quot;
        width=&quot;100%&quot;
        height=&quot;100%&quot;
        <span style="color:red;">seriesFilters=&quot;[]&quot;</span>&gt;

    &lt;!-- . . . --&gt;

&lt;/mx:LineChart&gt;
</pre>
<pre class="code">
&lt;mx:LineChart id=&quot;lineChart&quot;
        showDataTips=&quot;true&quot;
        dataProvider=&quot;{dp}&quot;
        width=&quot;100%&quot;
        height=&quot;100%&quot;&gt;

    &lt;!-- series filters --&gt;
    <span style="color:red;">&lt;mx:seriesFilters&gt;
        &lt;mx:Array /&gt;
    &lt;/mx:seriesFilters&gt;</span>

    &lt;!-- . . . --&gt;

&lt;/mx:LineChart&gt;
</pre>
<p>Full code after the jump.</p>
<p><span id="more-293"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/LineChart_seriesFilters_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/11/13/removing-the-default-drop-shadow-from-a-linechart-chart-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function init(evt:Event):void {
                var chart:LineChart = evt.currentTarget as LineChart;
                seriesFilterArr = chart.seriesFilters;
            }

            private function checkBox_click(evt:MouseEvent):void {
                var len:uint = lineChart.seriesFilters.length;
                if (len &gt; 0) {
                    lineChart.seriesFilters = [];
                } else {
                    lineChart.seriesFilters = seriesFilterArr;
                }
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:XMLListCollection id="dp"&gt;
        &lt;mx:source&gt;
            &lt;mx:XMLList&gt;
                &lt;quote date="8/27/2007" open="40.38" close="40.81" /&gt;
                &lt;quote date="8/24/2007" open="40.5" close="40.41" /&gt;
                &lt;quote date="8/23/2007" open="40.82" close="40.6" /&gt;
                &lt;quote date="8/22/2007" open="40.4" close="40.77" /&gt;
                &lt;quote date="8/21/2007" open="40.41" close="40.13" /&gt;
                &lt;quote date="8/20/2007" open="40.55" close="40.74" /&gt;
                &lt;quote date="8/17/2007" open="40.18" close="40.32" /&gt;
                &lt;quote date="8/16/2007" open="39.83" close="39.96" /&gt;
                &lt;quote date="8/15/2007" open="40.22" close="40.18" /&gt;
                &lt;quote date="8/14/2007" open="41.01" close="40.41" /&gt;
                &lt;quote date="8/13/2007" open="41" close="40.83" /&gt;
                &lt;quote date="8/10/2007" open="41.3" close="41.06" /&gt;
                &lt;quote date="8/9/2007" open="39.9" close="40.75" /&gt;
                &lt;quote date="8/8/2007" open="39.61" close="40.23" /&gt;
                &lt;quote date="8/7/2007" open="39.08" close="39.42" /&gt;
                &lt;quote date="8/6/2007" open="38.71" close="39.38" /&gt;
                &lt;quote date="8/3/2007" open="39.47" close="38.75" /&gt;
                &lt;quote date="8/2/2007" open="39.4" close="39.52" /&gt;
                &lt;quote date="8/1/2007" open="40.29" close="39.58" /&gt;
            &lt;/mx:XMLList&gt;
        &lt;/mx:source&gt;
    &lt;/mx:XMLListCollection&gt;

    &lt;mx:Array id="seriesFilterArr" /&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:CheckBox id="checkBox"
                label="toggle series filters:"
                labelPlacement="left"
                selected="false"
                click="checkBox_click(event);" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:LineChart id="lineChart"
            showDataTips="true"
            dataProvider="{dp}"
            width="100%"
            height="100%"
            creationComplete="init(event);"&gt;

        &lt;!-- vertical axis --&gt;
        &lt;mx:verticalAxis&gt;
            &lt;mx:LinearAxis baseAtZero="false" title="Price" /&gt;
        &lt;/mx:verticalAxis&gt;

        &lt;!-- horizontal axis --&gt;
        &lt;mx:horizontalAxis&gt;
            &lt;mx:CategoryAxis id="ca" categoryField="@date" title="Date" /&gt;
        &lt;/mx:horizontalAxis&gt;

        &lt;!-- horizontal axis renderer --&gt;
        &lt;mx:horizontalAxisRenderers&gt;
            &lt;mx:AxisRenderer axis="{ca}" canDropLabels="true" /&gt;
        &lt;/mx:horizontalAxisRenderers&gt;

        &lt;!-- series --&gt;
        &lt;mx:series&gt;
            &lt;mx:LineSeries yField="@close" form="curve" displayName="Close" /&gt;
            &lt;mx:LineSeries yField="@open" form="curve" displayName="Open" /&gt;
        &lt;/mx:series&gt;

    &lt;/mx:LineChart&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/LineChart_seriesFilters_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/LineChart_seriesFilters_test/bin/main.html" width="100%" height="500"></iframe></p>
<p class="construction">By default, the <code>seriesFilters</code> property contains an array with a single DropShadowFilter with the following properties:<br />
<em>&nbsp;&nbsp;&nbsp; alpha = 1<br />
&nbsp;&nbsp;&nbsp; angle = 45<br />
&nbsp;&nbsp;&nbsp; blurX = 4<br />
&nbsp;&nbsp;&nbsp; blurY = 4<br />
&nbsp;&nbsp;&nbsp; color = 0<br />
&nbsp;&nbsp;&nbsp; distance = 4<br />
&nbsp;&nbsp;&nbsp; hideObject = false<br />
&nbsp;&nbsp;&nbsp; inner = false<br />
&nbsp;&nbsp;&nbsp; knockout = false<br />
&nbsp;&nbsp;&nbsp; quality = 1<br />
&nbsp;&nbsp;&nbsp; strength = 1</em></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Removing the default drop shadow from a LineChart chart in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/11/13/removing-the-default-drop-shadow-from-a-linechart-chart-in-flex/',contentID: 'post-293',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'seriesFilters',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/11/13/removing-the-default-drop-shadow-from-a-linechart-chart-in-flex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Controlling whether a LineChart should set its base value at zero</title>
		<link>http://blog.flexexamples.com/2007/11/12/controlling-whether-a-linechart-should-set-its-base-value-at-zero/</link>
		<comments>http://blog.flexexamples.com/2007/11/12/controlling-whether-a-linechart-should-set-its-base-value-at-zero/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 06:24:04 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Charting]]></category>
		<category><![CDATA[LinearAxis]]></category>
		<category><![CDATA[LineSeries]]></category>
		<category><![CDATA[baseAtZero]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/12/controlling-whether-a-linechart-should-set-its-base-value-at-zero/</guid>
		<description><![CDATA[<p>The following example creates a simple LineChart in Flex 3 and lets you toggle the baseAtZero property which controls whether the minimum or maximum chart value should be set to zero. Since a sample is worth 1000 words, read on.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/LinearAxis_baseAtZero_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0"?&#62; &#60;!-- http://blog.flexexamples.com/2007/11/12/controlling-whether-a-linechart-should-set-its-base-value-at-zero/ --&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example creates a simple LineChart in Flex 3 and lets you toggle the <code>baseAtZero</code> property which controls whether the minimum or maximum chart value should be set to zero. Since a sample is worth 1000 words, read on.</p>
<p>Full code after the jump.</p>
<p><span id="more-292"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/LinearAxis_baseAtZero_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/11/12/controlling-whether-a-linechart-should-set-its-base-value-at-zero/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:XMLListCollection id="dp"&gt;
        &lt;mx:source&gt;
            &lt;mx:XMLList&gt;
                &lt;quote date="8/27/2007" open="40.38" high="41.11" low="40.25" close="40.81" /&gt;
                &lt;quote date="8/24/2007" open="40.5" high="40.65" low="39.8" close="40.41" /&gt;
                &lt;quote date="8/23/2007" open="40.82" high="40.99" low="40.33" close="40.6" /&gt;
                &lt;quote date="8/22/2007" open="40.4" high="41" low="40.2" close="40.77" /&gt;
                &lt;quote date="8/21/2007" open="40.41" high="40.95" low="39.87" close="40.13" /&gt;
                &lt;quote date="8/20/2007" open="40.55" high="40.85" low="39.94" close="40.74" /&gt;
                &lt;quote date="8/17/2007" open="40.18" high="40.48" low="39.32" close="40.32" /&gt;
                &lt;quote date="8/16/2007" open="39.83" high="40.56" low="39.28" close="39.96" /&gt;
                &lt;quote date="8/15/2007" open="40.22" high="41.25" low="40.12" close="40.18" /&gt;
                &lt;quote date="8/14/2007" open="41.01" high="41.05" low="40.18" close="40.41" /&gt;
                &lt;quote date="8/13/2007" open="41" high="41.13" low="40.26" close="40.83" /&gt;
                &lt;quote date="8/10/2007" open="41.3" high="41.62" low="40.1" close="41.06" /&gt;
                &lt;quote date="8/9/2007" open="39.9" high="41.74" low="39.86" close="40.75" /&gt;
                &lt;quote date="8/8/2007" open="39.61" high="40.67" low="39.5" close="40.23" /&gt;
                &lt;quote date="8/7/2007" open="39.08" high="39.91" low="38.61" close="39.42" /&gt;
                &lt;quote date="8/6/2007" open="38.71" high="39.77" low="38.54" close="39.38" /&gt;
                &lt;quote date="8/3/2007" open="39.47" high="39.66" low="38.7" close="38.75" /&gt;
                &lt;quote date="8/2/2007" open="39.4" high="39.8" low="39.05" close="39.52" /&gt;
                &lt;quote date="8/1/2007" open="40.29" high="40.49" low="38.57" close="39.58" /&gt;
            &lt;/mx:XMLList&gt;
        &lt;/mx:source&gt;
    &lt;/mx:XMLListCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:CheckBox id="checkBox"
                label="baseAtZero:"
                labelPlacement="left"
                selected="false" /&gt;

        &lt;mx:Spacer width="100%" /&gt;

        &lt;mx:Legend dataProvider="{lineChart}" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:LineChart id="lineChart"
            showDataTips="true"
            dataProvider="{dp}"
            width="100%"
            height="100%"&gt;

        &lt;!-- series filters --&gt;
        &lt;mx:seriesFilters&gt;
            &lt;mx:Array /&gt;
        &lt;/mx:seriesFilters&gt;

        &lt;!-- vertical axis --&gt;
        &lt;mx:verticalAxis&gt;
            &lt;mx:LinearAxis baseAtZero="{checkBox.selected}" title="Price" /&gt;
        &lt;/mx:verticalAxis&gt;

        &lt;!-- horizontal axis --&gt;
        &lt;mx:horizontalAxis&gt;
            &lt;mx:CategoryAxis id="ca" categoryField="@date" title="Date" /&gt;
        &lt;/mx:horizontalAxis&gt;

        &lt;!-- horizontal axis renderer --&gt;
        &lt;mx:horizontalAxisRenderers&gt;
            &lt;mx:AxisRenderer axis="{ca}" canDropLabels="true" /&gt;
        &lt;/mx:horizontalAxisRenderers&gt;

        &lt;!-- series --&gt;
        &lt;mx:series&gt;
            &lt;mx:LineSeries yField="@close" form="curve" displayName="Close" /&gt;
            &lt;mx:LineSeries yField="@open" form="curve" displayName="Open" /&gt;
        &lt;/mx:series&gt;

    &lt;/mx:LineChart&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/LinearAxis_baseAtZero_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/LinearAxis_baseAtZero_test/bin/main.html" width="100%" height="500"></iframe></p>
<p>For more information on the NumericAxis class&#8217;s <code>baseAtZero</code> property, see <a href="http://livedocs.adobe.com/flex/3/langref/mx/charts/chartClasses/NumericAxis.html#baseAtZero">http://livedocs.adobe.com/flex/3/langref/mx/charts/chartClasses/NumericAxis.html#baseAtZero</a>.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Controlling whether a LineChart should set its base value at zero on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/11/12/controlling-whether-a-linechart-should-set-its-base-value-at-zero/',contentID: 'post-292',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'baseAtZero',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/11/12/controlling-whether-a-linechart-should-set-its-base-value-at-zero/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

