Skip to content

[Cherry-pick to 1.x] Add the sticky positioning to center the origin axes #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2024

Conversation

mauriciopoppe
Copy link
Owner

Added the option position: sticky to the axis, when set the axis will float in the viewport if the origin is visible.

Example:

      functionPlot({
        target: '#playground',
        title: 'quadratic with different axes position',
        width: 580,
        height: 400,
        xAxis: {
          position: 'sticky'
        },
        yAxis: {
          position: 'left'
        },
        data: [{
          fn: 'x^2'
        }]
      })

Ref #291
Cherry pick of #295

@mauriciopoppe mauriciopoppe merged commit 109acf3 into v1.x Jun 9, 2024
7 checks passed
@mauriciopoppe mauriciopoppe deleted the cp-sticky-positioning branch June 9, 2024 00:32
@mauriciopoppe mauriciopoppe changed the title Add the sticky positioning to center the origin axes [Cherry-pick to 1.x] Add the sticky positioning to center the origin axes Jun 9, 2024
@simone-panico
Copy link
Contributor

Quick question, but when will you make the release? I need the Function to Center the Axes for my Personal Project

@mauriciopoppe
Copy link
Owner Author

Done, it should be available in https://github.com/mauriciopoppe/function-plot/releases/tag/v1.25.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants