Chart dumps an object, not a chart

If I set my language to C# Statements, and use the following...

List> donations = new List> {
new Tuple(0, 10),
new Tuple(1, 7),
new Tuple(3, 12),
new Tuple(4, 3)

var hours = Enumerable.Range(0, 5)
.Select(n => new {
Hour = n,
Number = donations.FirstOrDefault(d => d.Item1 == n)?.Item2 ?? 0

hours.Chart(h => h.Hour, h => h.Number).Dump();

...then I don't get a Chart tab in the results pane, I get a LINQPadChart`1 dump, which looks like some object.

How do I get the chart? I'm using LinqPad v5.36.03 premium edition


  • Sorry, should have included a screenshot...

  • Click the 'Results to Rich Text' button on the toolbar.
  • Thanks! I discovered that adding a call to ToWindowsChart() before Dump worked as well. That way I can leave the results as data grids (which is usually more useful) and still get the chart.

    Thanks again.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!