categoryAxis.majorTicks Object

The configuration of the category axis major ticks.

Example - configure the category axis major ticks

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: [{
    majorTicks: {
      size: 6,
      color: "green",
      width: 5
    },
    categories: ["2012", "2013"]
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

categoryAxis.majorTicks.color String (default: "black")

The color of the category axis major ticks lines. Accepts a valid CSS color string, including hex and rgb.

Example - set the category axis major ticks color as a hex string

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: {
    categories: [ "2012", "2013"],
    majorTicks: {
      color: "#aa00bb"
    }
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

Example - set the category axis major ticks color as a RGB value

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: {
    categories: [ "2012", "2013"],
    majorTicks: {
      color: "rgb(128, 0, 255)"
    }
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

Example - set the category axis major ticks color by name

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: {
    categories: [ "2012", "2013"],
    majorTicks: {
      color: "green"
    }
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

categoryAxis.majorTicks.size Number (default: 4)

The length of the tick line in pixels.

Example - set the category axis major ticks size

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: [{
    majorTicks: {
      size: 6
    },
    categories: ["2012", "2013"]
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

categoryAxis.majorTicks.visible Boolean (default: true)

If set to true the chart will display the category axis major ticks. By default the category axis major ticks are visible.

Example - hide the category axis major ticks

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: [{
    majorTicks: {
      visible: false
    },
    categories: ["2012", "2013"]
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

categoryAxis.majorTicks.width Number (default: 1)

The width of the major ticks in pixels.

Example - set the category axis major ticks width

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: [{
    majorTicks: {
      width: 3
    },
    categories: ["2012", "2013"]
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

categoryAxis.majorTicks.step Number (default: 1)

The step of the category axis major ticks.

Example - set the category axis major ticks step

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: [{
    majorTicks: {
      step: 2
    },
    categories: ["2011", "2012", "2013"]
  }],
  series: [{
    data: [1, 2, 3]
  }]
});
</script>

categoryAxis.majorTicks.skip Number (default: 0)

The skip of the category axis major ticks.

Example - set the category axis major ticks

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: [{
    majorTicks: {
      skip: 2
    },
    categories: ["2011", "2012", "2013"]
  }],
  series: [{
    data: [1, 2, 3]
  }]
});
</script>
In this article
Not finding the help you need?