Topic: Y-Axis Interval in Integer

aminseifoori free asked 4 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 4 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 free commented 4 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

  • ForumUser: 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