New to Kendo UI for jQueryStart a free 30-day trial

ValueAxis.title

configuration

The title configuration of the value axis.

The valueAxis.title.text option must be set in order to display the title.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: {
    title: {
      text: "Years",
      background: "green",
      border: {
        width: 1,
      }
    }
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

The background color of the title. Accepts a valid CSS color string, including hex and rgb.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: {
    title: {
      text: "Years",
      background: "green"
    }
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

The border of the title.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    title: {
      text: "Years",
      border: {
        color: "green",
        dashType: "dashDot",
        width: 1
      }
    }
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

The text color of the title. Accepts a valid CSS color string, including hex and rgb.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: {
    title: {
      text: "Years",
      color: "#aa00bb"
    }
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: {
    title: {
      text: "Years",
      color: "rgb(128, 0, 255)"
    }
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: {
    title: {
      text: "Years",
      color: "green"
    }
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

The font style of the title.

Default: "16px Arial,Helvetica,sans-serif"

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    title: {
       text: "Years",
       font: "20px sans-serif",
    }
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

The margin of the title. A numeric value will set all margins.

Default: 5

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    title: {
      text: "Years",
      margin: 20
    }
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

The padding of the title. A numeric value will set all paddings.

Default: 0

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    title: {
      text: "Years",
      padding: 20
    }
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

The position of the title.

The supported values are:

  • "top" - the axis title is positioned on the top (applicable to vertical axis)
  • "bottom" - the axis title is positioned on the bottom (applicable to vertical axis)
  • "left" - the axis title is positioned on the left (applicable to horizontal axis)
  • "right" - the axis title is positioned on the right (applicable to horizontal axis)
  • "center" - the axis title is positioned in the center

Default: "center"

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: {
    title: {
      text: "Years",
      position: "left"
    }
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

The rotation angle of the title. By default the title is not rotated.

Default: 0

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    title: {
      text: "Years",
      rotation: 90
    }
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

The text of the title.

The text can be split into multiple lines by using line feed characters ("\n").

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    title: {
      text: "Years"
    }
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

If set to true the chart will display the value axis title. By default the value axis title is visible.

Default: true

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    title: {
      text: "Years",
      visible: false
    }
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

A function that can be used to create a custom visual for the title. The available argument fields are:

  • text - the label text.
  • rect - the kendo.geometry.Rect that defines where the visual should be rendered.
  • sender - the chart instance (may be undefined).
  • options - the label options.
  • createVisual - a function that can be used to get the default visual.
<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    valueAxis: [{
      title: {
        text: "Years",
        visual: function(e) {
          return new kendo.drawing.Text(e.text, e.rect.origin, {
            fill: {
              color: "red"
            }
          });
        }
      }
    }],
    series: [
      { data: [1, 2, 3] }
    ]
  });
</script>