<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/09/28/setting-the-marker-width-and-height-on-a-legend-control-in-flex/ -->
<mx:Application name="Legend_markerHeight_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

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

            private function markerWSlider_change(evt:SliderEvent):void {
                legend.setStyle("markerWidth", evt.value);
            }

            private function markerHSlider_change(evt:SliderEvent):void {
                legend.setStyle("markerHeight", evt.value);
            }
        ]]>
    </mx:Script>

    <mx:XMLListCollection id="dp">
        <mx:source>
            <mx:XMLList>
                <product label="Product 1" data="3" />
                <product label="Product 2" data="1" />
                <product label="Product 3" data="4" />
                <product label="Product 4" data="1" />
                <product label="Product 5" data="5" />
                <product label="Product 6" data="9" />
            </mx:XMLList>
        </mx:source>
    </mx:XMLListCollection>

    <mx:ApplicationControlBar dock="true">
        <mx:Form styleName="plain">
            <mx:FormItem label="markerWidth:">
                <mx:HSlider id="markerWSlider"
                        minimum="5"
                        maximum="15"
                        value="10"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true"
                        change="markerWSlider_change(event);" />
            </mx:FormItem>
            <mx:FormItem label="markerHeight:">
                <mx:HSlider id="markerHSlider"
                        minimum="5"
                        maximum="15"
                        value="10"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true"
                        change="markerHSlider_change(event);" />
            </mx:FormItem>
        </mx:Form>
    </mx:ApplicationControlBar>

    <mx:Panel id="panel"
            styleName="opaquePanel"
            width="100%"
            height="100%">
        <mx:PieChart id="pieChart"
                dataProvider="{dp}"
                showDataTips="true"
                height="100%"
                width="100%">
            <mx:series>
                <mx:PieSeries id="pieSeries"
                        field="@data"
                        nameField="@label"
                        filters="[]" />
            </mx:series>
        </mx:PieChart>
        <mx:ControlBar>
            <mx:Legend id="legend"
                    dataProvider="{pieChart}"
                    direction="horizontal"
                    horizontalGap="100"
                    markerWidth="10"
                    markerHeight="10" />
        </mx:ControlBar>
    </mx:Panel>

</mx:Application>