Skip to content

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
@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.

3 participants