Y-Axis Interval in Integer


Topic: Y-Axis Interval in Integer

aminseifoori asked 5 years ago

Hi, I am using MDB Free version for my Angular project and I have a chart in my App which I need to have Y-Axis interval in Integer. Having said that my data also are in Integer but its Y-Axis interval is in decimal. Sample of the chart


Konrad Stępień staff answered 5 years ago

Hi @aminseifoori,

Please follow my code below:

public chartOptions: any = {
  responsive: true,
  scales: {
    yAxes: [{
      ticks: {
        min: 0,
        stepSize: 1
      }
    }]
  }
};

Results:

enter image description here


aminseifoori commented 5 years ago

@Konrad Stępień Thank you for your prompt reply. It solved my issue.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.8.0
  • Device: PC and Mobile
  • Browser: All Browser
  • OS: Windows, Mac, iOS, Android
  • Provided sample code: No
  • Provided link: No