tags:

views:

458

answers:

2

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.

+1  A: 

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

Shua
A: 

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.

Jeremy Mitchell