X Axis label step spacing in Kendo UI

I am new to Kendo-UI. I could not set the x-axis steps in 0.1 intervals (0,1,0,2,0,3,0,4 etc.). It gives 0.2 by default (steps: 1). Does anyone know how to do 0.1 spacing?

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Kendo UI Snippet</title>

    <link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.408/styles/kendo.common.min.css">
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.408/styles/kendo.rtl.min.css">
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.408/styles/kendo.default.min.css">
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.408/styles/kendo.dataviz.min.css">
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.408/styles/kendo.dataviz.default.min.css">
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.408/styles/kendo.mobile.all.min.css">

    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.1.408/js/kendo.all.min.js"></script>
</head>
<body>

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1, 2]] }
  ],
  xAxis: {
    labels: {
      steps: 1
    }
  }
});
</script>
</body>
</html>

      

http://dojo.telerik.com/onuwu

+3


source to share


1 answer


It looks like you want to set majorUnit: .1

as a property to xAxis

.

http://dojo.telerik.com/onuwu/4



Their documentation isn't the easiest to find things, but it's probably a good read if you do a lot of charting. Here's a bit on valueAxis.majorUnit

.

$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1, 2]] }
  ],
  xAxis: {
    majorUnit: .1
  }
});

      

+3


source







All Articles