Is there any possibility to disable a particular legend for LineSeries component in a line chart.
Let say that we have the following code:
<mx:Panel title="Line Chart">
<mx:LineChart id="myChart"
dataProvider="{expenses}"
showDataTips="true"
>
<mx:horizontalAxis>
<mx:CategoryAxis
dataProvider="{expenses}"
categoryField="Month"
/>
</mx:horizontalAxis>
<mx:series>
<mx:LineSeries
yField="Profit"
displayName="Profit"
/>
<mx:LineSeries
yField="Expenses"
displayName="Expenses"
/>
</mx:series>
</mx:LineChart>
<mx:Legend id="legend" dataProvider="{myChart}"/>
It will produce the following line chart:
And this the result that i want:
UPDATE:
Bare in mind that I have to use the legend's DataProvider as myChart because the data is dynamically build. Also, the legend is customized.