Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xamarin Forms add itemsource to var barSeries = new ColumnSeries from ObservableRangeCollection #16

Open
ArimaSD opened this issue May 21, 2019 · 1 comment

Comments

@ArimaSD
Copy link

ArimaSD commented May 21, 2019

Hi, I want to populate itemsource items with: var items = Registrar.OrderBy(c => c.Especie).Select(x => x.Ancho).ToList();

I was thinking of something like this perhaps??

var barSeries = new ColumnSeries
{
ItemsSource = new List(new[]
{
new BarItem{ Value = Registrar.OrderBy(c => c.Especie).Select(x => x.Ancho),
},

             }),
            LabelPlacement = LabelPlacement.Inside,
            LabelFormatString = "{0}"
        };
@ArimaSD
Copy link
Author

ArimaSD commented May 23, 2019

ItemsSource = Registrar.OrderBy(c => c.Especie).Select(x=> new BarItem() { Value = x.Ancho }).ToList();

Solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant