Examples for charts with VB?
Anyone had success creating charts with vb? The C# example is the following:
I tried to convert it like this but no luck. I'm assuming it works with vb but can't find examples anywhere.
var customers = new[]
{
new { Name = "John", TotalOrders = 100 },
new { Name = "Mary", TotalOrders = 130 },
new { Name = "Sara", TotalOrders = 140 },
new { Name = "Paul", TotalOrders = 125 },
};
customers.Chart (c => c.Name, c => c.TotalOrders).Dump(); // Don't forget to Dump it!
I tried to convert it like this but no luck. I'm assuming it works with vb but can't find examples anywhere.
Dim customers = {
New With{.Name = "John", .TotalOrders = 100},
New With{.Name = "Mary", .TotalOrders = 130},
New With{.Name = "Sara", .TotalOrders = 140},
New With{.Name = "Paul", .TotalOrders = 125}
}
customers.Chart(customers.Select(Function(x)x.Name),customers.Select(Function(x)x.totalorders)).Dump()
Comments
c => c.Name
translates to VB.NETFunction(c) c.Name