Skip to content

[Bug]: Auto skip Y scale not working #1160

Not planned
Not planned

Description

@SneakingSlayer

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

// It still hides the ticks on smaller widths

import { Bar } from 'react-chartjs-2';

<Bar
className="chartjs-render-monitor"
data={[...data]}
options = { { scales: { y : { autoSkip: false } } } }
/>

Reproduction

Set autoSkip false to the Y scale of any chart and see if it hides the ticks.

chart.js version

4.2.1

react-chartjs-2 version

^5.0.1

Possible solution

No response

Activity

  1. Luise8 commented on Dec 21, 2023

    @Luise8

    Any progress here? I have the same problem with x scale.

  2. SneakingSlayer commented on Dec 21, 2023

    @SneakingSlayer
    Author

    Any progress here? I have the same problem with x scale.

    negative.

  3. Luise8 commented on Dec 21, 2023

    @Luise8

    I found I had a mistake in callback. So now it's working for me.

    "x": { 
            "ticks": {
              "autoSkip":    false,
              "maxRotation": 0,
              "font":        {
                "size":   "10px",
                "family": "Roboto, Helvetica,Arial,sans-serif",
              },
              //"callback":
              },
            },              
          },
    
  4. dangreen commented on Nov 30, 2026

    @dangreen
    Collaborator

    Closing: this is about how Chart.js itself behaves or is configured, while react-chartjs-2 passes data, options and plugins to Chart.js as they are. The Chart.js docs cover it: https://www.chartjs.org/docs/latest/ If it turns out to be a bug, please report it to Chart.js: https://github.com/chartjs/Chart.js/issues

    autoSkip goes under the ticks of the scale: scales.y.ticks.autoSkip.

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