chartjs / chartjs/Chart.js

Specifiying a fixedStepSize for ticks should set autoSkip to false

Open
#4,048 0 comments 0 reactions 0 assignees View on GitHub
help wanted type: enhancement
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

## Expected Behavior

I was expecting `['Options']['scales']['xAxes'][0]['ticks']['fixedStepSize']` = 1;` to give me a step size of 1.

## Current Behavior

I got the step size that chart.js had worked out (2: 40,42,44, etc.).
I had to specify `['Options']['scales']['xAxes'][0]['ticks']['autoSkip'] = false;` to get a step size of 1.

## Possible Solution

Update the docs to mention that this needs to be done. (Easiest)
Or, in the code, set autoSkip to false if you are specifying a step size

## Environment

* Chart.js version: 2.5

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.