Skip to content

share X-axis in Chart.Stack #38

Closed
Closed

Description

@hoangdungt2

Hi again,
Really enjoy the package so far. I notice on the plotly documentation there is a section about share axis subplots:
https://plotly.com/python/subplots/ with the option of shared_xaxes=True, wonder how I can do the same in FSharp.Plotly, I played around with Chart.withX_AxisStyle and Chart.withX_Axis but didn't go anywhere. Do give some advice, thanks.

Activity

  1. kMutagene commented on Jun 3, 2020

    @kMutagene
    Collaborator

    Hi there again,

    I'm glad you like it! What you want to do is something that I think we definitely should offer. However looking into it I didn't get the subplot grid working directly. When I have a working prototype I will get back at you and publish a prerelease package so you can test it. Thanks for reporting what you are doing with our library, it's really interesting to see.

  2. hoangdungt2 commented on Jun 4, 2020

    @hoangdungt2
    Author

    Thanks Kevin, I'm using FSharp.Plotly in several projects in my company, certainly looking forward to the new features.

  3. self-assigned this
    on Jun 7, 2020
  4. added a commit that references this issue on Jun 7, 2020
  5. kMutagene commented on Jun 8, 2020

    @kMutagene
    Collaborator

    Hi @hoangdungt2 , i implemented a new version of the chart, Chart.SingleStack, wich is a version of the also fresh Chart.Grid with only 1 column. Here is a snippet that should get you what you want for shared xAxis:

    [
        Chart.Point([(0,1)]) |> Chart.withY_AxisStyle("This title")
        Chart.Point([(0,1)]) 
        |> Chart.withY_AxisStyle("Must be set",Zeroline=false)
        Chart.Point([(0,1)]) 
        |> Chart.withY_AxisStyle("on the respective charts",Zeroline=false)
    ]
    |> Chart.SingleStack
    |> Chart.withLayoutGridStyle(XSide=StyleParam.LayoutGridXSide.Bottom)
    |> Chart.withTitle("Hi i am the new SingleStackChart")
    |> Chart.withX_AxisStyle("im the shared xAxis")
    |> Chart.Show
    

    For more than one column, you can use Chart.Grid. Should be available as a new prerelease package here.

  6. hoangdungt2 commented on Jun 9, 2020

    @hoangdungt2
    Author

    hi Kevin,
    Big thanks, the new nuget package works perfectly for me.
    Really appreciate your quick action 👍👍

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions