A good way to do this is to configure your chart object using static Javascript and then load your chart series as JSON data using Ajax and the addSeries method. You can use the Controller.Json method to return your LINQ results as JSON. Assuming you are passing a numeric array to the Controller.Json method in your AJAX action, the following is a simple example of the JavaScript needed to do this:
$(document).ready(function() {
var chart = new Highcharts.Chart({
chart: {
renderTo: "<chart-div>"
},
title: { text: "Test Chart" },
});
$.ajax({
url: "<query-url>",
success: function(result) {
chart.addSeries({
data: result,
});
}
});
});
Replace <chart-div> with your container and <query-url> with your Ajax URL or a call to UrlHelper.Action.