I am using the GoogleChart API to render some charts . To do this, I am executing a LINQ Query which looks similar to this:
var dataList = from products in entities.Productlist
select new { products.Name, products.Price, products.piecesInStock, products.ID,
products.category, products.piecesOrdered, products.maxPieces };
Dictionary<string, double> dataValues = new Dictionary<string, double>();
foreach (var item in dataList)
{
dataValues.Add(item.Name, (item.piecesInStock / item.maxPieces));
}
after this, I am calling a custom method which is dealing with the javascript. The idea is to make my life a bit easier by letting me choose which values are displayed (read: item.maxPieces, item.price etc <--- the listcolumns) through the editorpart.
what would be the way to go, to accomplish this?
Kind regards