fslaborg / FSharp.Charting

Charting library suitable for interactive F# scripting
http://fslab.org/FSharp.Charting/
Other
215 stars 67 forks source link

Feature request: tabular view #90

Open bohdanszymanik opened 9 years ago

bohdanszymanik commented 9 years ago

In using F# and FSharp Charting for data analysis there are many occasions when you want to have a quick tabular view of the data in combination with a chart. The interactive view is ok, but a tabular window would be useful - and especially a quick copy to the clipboard to enable paste into excel. It makes sense in terms of data visualisation - a tabular view is a specialised data view as are various chart types.

tpetricek commented 9 years ago

I agree, having an option to quickly show a table in FsLab would be neat!

My preferred options for this would be to have it output HTML - that seems to be the only way to make this cross-platform and I'm generally in favor of using cross-platform solutions in FsLab. (That's why I'm also using XPlot a bit more than F# Charting recently).

I guess that if it produces HTML <table>, then Excel will be able to parse it when you copy & past.

I guess it could be added to XPlot or as a separate component to FsLab. If you were interested in contributing this, it sounds like the easiest option is to start by hacking things in FsLab.fsx here.

I like the idea of having a type that looks something like this:

type Table() = 
    static member Create(list:seq<'T>) = ..     
    static member Create(list:seq<#seq<'T>>) = ..     
    static member Create(list:Frame<'T>) = ..

Then you could write:

anything |> Table.Create

This would create some object that would be then handled by fsi.AddPrinter and it would open the table in the browser.

(In longer term, we'll figure out how to make these outputs embedded in VS/Atom!)

bohdanszymanik commented 9 years ago

Ah - XPlot - I hadn't seen what has been happening with fslab. I'll start using it - I get the idea of the table type. I'll try out for the data I'm using - it's all performance related metrics from a big IT system. Cheers,