New to Kendo UI for jQuery? Start a free 30-day trial

Panes.title

configuration

The title configuration of the chart pane.

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

panes.title

String|Object
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top"
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom"
      }
    }
  ]
});
</script>

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

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top",
        background: "red"
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom",
        background: "green"
      }
    }
  ]
});
</script>

The border of the title.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top",
        border: {
          color: "red",
          width: 2
        }
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom",
        border: {
          color: "green",
          width: 2
        }
      }
    }
  ]
});
</script>

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

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top",
        color: "#aa00bb"
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom",
        color: "#a0b0c0"
      }
    }
  ]
});
</script>
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top",
        color: "rgb(128, 0, 255)"
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom",
        color: "rgb(128, 0, 255)"
      }
    }
  ]
});
</script>
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top",
        color: "red"
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom",
        color: "green"
      }
    }
  ]
});
</script>

The font style of the title.

Default: "700 18px Arial,Helvetica,sans-serif"

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top",
        font: "20px sans-serif"
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom",
        color: "green"
      }
    }
  ]
});
</script>
Number|Object

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

Default: 5

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top",
        margin: 10
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom",
        margin: 10
      }
    }
  ]
});
</script>

The position of the title.

The supported values are:

  • "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({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top",
        position: "left"
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom",
        position: "left"
      }
    }
  ]
});
</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({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top"
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom"
      }
    }
  ]
});
</script>

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

Default: true

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2, 3] },
    { data: [1, 2, 3, 4], axis: "bottom" }
  ],
  valueAxis: [
    { pane: "top-pane" },
    { pane: "bottom-pane", name: "bottom" }
  ],
  panes: [
    { name: "top-pane",
      title: {
        text: "Top",
        visible: false
      }
    },
    { name: "bottom-pane",
      title: {
        text: "Bottom",
        visible: false
      }
    }
  ]
});
</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({
    series: [
      { data: [1, 2, 3] }
    ],
    panes: [{
      title: {
        text: "foo bar",
        visual: function (e) {
          var layout = new kendo.drawing.Layout(e.rect, {
            orientation: "vertical",
            alignContent: "center"
          });
          var words = e.text.split(" ");
          for (var i = 0; i < words.length; i++) {
            layout.append(new kendo.drawing.Text(words[i]));
          }
          layout.reflow();
          return layout;
        }
      }
    }]
  });
</script>