question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Y Axis scale steps (increments) of 10

See original GitHub issue

Hello,

I have a chart that goes from 0 to 100, i would like to show scale steps (increments) of 10 in the Y axis, so it would display like

100
90
80
70
...
20
10
0

but by default it only shows as

100
75
50
25
0

I couldn’t see anything in the Documents on the main website. Here is my current options

            var lineChartOptions = {
                height: '500px',
                low: 0,
                high: 100,
                showArea: true,
                showPoint: true,
                fullWidth: true,
                //chartPadding: {
                //  right: 40
                //},
                axisY: {
                    onlyInteger: true,          
                },
                lineSmooth: Chartist.Interpolation.cardinal({
                    fillHoles: true,
                }), 
                plugins: [
                    Chartist.plugins.tooltip()
                ],
            };

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

15reactions
JordanSaynercommented, May 13, 2016

i Figured this out btw, the code need is

    axisY: {
            type: Chartist.FixedScaleAxis,
            ticks: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
            low: 0
    },
2reactions
gionkunzcommented, Feb 6, 2020

This example can actually be copied from the skimpy documentation and code examples here https://gionkunz.github.io/chartist-js/getting-started.html#switching-axis-type 😆

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the scale of the horizontal (category) axis in a chart
Looking for Office 2010 steps? In a chart, click to select the category axis that you want to change, or do the following...
Read more >
change axis scaling step size in ggplot2 - Stack Overflow
i have an R script which generate a geom_tile plot exactly as i want. but the problem is that the axis step size...
Read more >
10 Position scales and axes | ggplot2
Position scales are used to control the locations of visual entities in a plot, and how those locations are mapped to data values....
Read more >
How to Change the Y-Axis in Excel
To change the interval of units (10, 1000, etc.), go to the “Axis Options -> Units” section, then type a new number in...
Read more >
How to Control Ticks Steps on the Y Scale in Chart js - YouTube
How to Control Ticks Steps on the Y Scale in Chart jsIn this video we will cover how to control ticks steps on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found