Jeremy Mitchell
Jeremy Mitchell

Reputation: 329

Flex LineChart with Multiple Data Providers

Can I create a LineChart with multiple data providers? Since LineSeries has a dataprovider property, I'm assuming the answer is Yes.

I would expect something like this to work:

<LineChart>
    <series>
        <LineSeries dataprovider="{dp1}"/>
        <LineSeries dataprovider="{dp2}"/>
        <LineSeries dataprovider="{dp3}"/>
    </series>
</LineChart>

But, the LineChart only appears to work for me when the dataprovider is assigned to the LineChart.

Thanks.

Upvotes: 2

Views: 1796

Answers (2)

Jeremy Mitchell
Jeremy Mitchell

Reputation: 329

It turns out my misunderstanding of LineChart / LineSeries dataproviders stems from my misunderstanding of the custom component I was working with. Once I got a handle on the custom component's peculiar behavior, setting a dp at the LineSeries level was a no brainer.

Upvotes: 0

Shua
Shua

Reputation: 1315

You are correct but you have to specify the xfield and yfield for each series...

Upvotes: 1

Related Questions