Skip to content

How can I make y-axis labels sticky while scrolling horizontally? #838

Not planned

Description

@Selenestica

Hello, I'm trying to make my y-axis sticky if I have to scroll horizontally on my chart. I've looked around StackOverflow, and there is a great solution written in vanilla JS here. Below is a screenshot of what it looks like.
Screen Shot 2021-11-03 at 3 27 42 PM
However, I'm afraid I'm not savvy enough to convert that into React-speak, not for lack of trying of course (it's the extra canvas tag that's throwing me off for the most part).
Has anyone done this before? Or if not, can anyone help me convert the above JSFiddle into a working React version? Thanks in advance.

Activity

  1. dangreen commented on Nov 30, 2026

    @dangreen
    Collaborator

    Closing: this is a usage question rather than a bug report or a feature request. The docs of the wrapper are at https://react-chartjs-2.js.org and the chart options are described in the Chart.js docs: https://www.chartjs.org/docs/latest/

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions