Skip to content

Rationalise Plotly and GoogleCharts #29

Open

Description

@isaacabraham

Having the option of both these charting libraries is great. However, the APIs to consume them both are very different. GoogleCharts is somewhat similar to FSharp.Charting in that you can chuck lists of tuples and it just works - Plotly is completely different though, where you have to manually assign to x and y fields etc. etc..

It would be nice if the two APIs were brought in sync with one another.

Activity

  1. TahaHachana commented on Feb 7, 2016

    @TahaHachana
    Collaborator

    I agree, a higher level API for creating Plotly charts (at least the common types) would make it more appealing and familiar for someone used to FSharp.Charting. This is on my to-do and hopefully I'll implement it soon.

  2. tpetricek commented on Feb 7, 2016

    @tpetricek
    Member

    I agree this would be great - XPlot is currently providing just a thin layer, which makes a lot of sense.

    I think a great starting point would be just a script prototyping some of the wrapping - @isaacabraham, if you want to have a go at this, it can be very useful for exploring how to do this :).

  3. isaacabraham commented on Feb 7, 2016

    @isaacabraham
    Author

    @tpetricek is that a gentle "nudge" in my direction? :-) OK - I will! And this time I commit to actually coming up with at least a fork for review :-)

  4. TahaHachana commented on May 6, 2016

    @TahaHachana
    Collaborator

    I've started implementing this for some chart types

    let sales = ["2013", 1000; "2014", 1170; "2015", 660; "2016", 1030]
    let expenses = ["2013", 400; "2014", 460; "2015", 1120; "2016", 540]
    
    [sales; expenses]
    |> Plotly.Line
    |> Plotly.Show
  5. isaacabraham commented on May 6, 2016

    @isaacabraham
    Author

    I started work on this some months ago and got somewhere with it. The problem was whether to use pipe style or methods on a class. The latter allows optional args but the former can be nice with pipes.

    I also wasn't sure how to unify both facades... Let me post a gist of where I got to.


    From: Taha Hachanamailto:notifications@github.com
    Sent: ‎06/‎05/‎2016 17:34
    To: TahaHachana/XPlotmailto:XPlot@noreply.github.com
    Cc: Isaac Abrahammailto:isaac.abraham@gmail.com; Mentionmailto:mention@noreply.github.com
    Subject: Re: [TahaHachana/XPlot] Rationalise Plotly and GoogleCharts (#29)

    I've started implementing this for some chart types

    `let sales = ["2013", 1000; "2014", 1170; "2015", 660; "2016", 1030]
    let expenses = ["2013", 400; "2014", 460; "2015", 1120; "2016", 540]

    [sales; expenses]
    |> Plotly.Line
    |> Plotly.Show`


    You are receiving this because you were mentioned.
    Reply to this email directly or view it on GitHub:
    #29 (comment)

  6. isaacabraham commented on May 8, 2016

    @isaacabraham
    Author
  7. cartermp commented on Nov 8, 2019

    @cartermp
    Collaborator

    @isaacabraham would you be willing to contribute your code (and/or enhancements to it?)

  8. isaacabraham commented on Nov 10, 2019

    @isaacabraham
    Author

    @cartermp I vaguely remember looking into this. I think the problem was that the abstractions quickly became somewhat leaky because both chart APIs differed quite rapidly after doing basic operations.

  9. cartermp commented on Nov 10, 2019

    @cartermp
    Collaborator

    Gotcha, makes sense. I was wondering if there's a way to make it work similar to Julia's Plots library, which offers a consistent API across multiple backends. Probably possible, just needs some careful design work.

  10. dsyme commented on Nov 10, 2019

    @dsyme
    Member

    Gotcha, makes sense. I was wondering if there's a way to make it work similar to Julia's Plots library, which offers a consistent API across multiple backends. Probably possible, just needs some careful design work.

    Also worth taking a look at Oxyplot and seeing whether that should be brought into the family of charting options for use from F# Interactive (separate to XPlot). It's mostly used from C# but I think might be pretty good from F# now anonymous records are supported.

  11. isaacabraham commented on Nov 11, 2019

    @isaacabraham
    Author

    Having a consistent, unified charting "model" that we could use would be absolutely excellent - there are several projects chart projects all with similar but slightly different APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions