Edit this page

legend.margin Number |Object (default: 5)

The margin of the chart legend. A numeric value will set all paddings.

Example - set the chart legend margin as a number

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  legend: {
    margin: 20
  },
  series: [
    { name: "Series 1", data: [1, 2, 3] },
    { name: "Series 2", data: [3, 4, 5] }
  ]
});
</script>

legend.margin.bottom Number (default: 0)

The bottom margin of the chart legend.

Example - set the chart legend bottom margin

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  legend: {
    margin: {
      bottom: 20
    }
  },
  series: [
    { name: "Series 1", data: [1, 2, 3] },
    { name: "Series 2", data: [3, 4, 5] }
  ]
});
</script>

legend.margin.left Number (default: 0)

The left margin of the chart legend.

Example - set the chart legend left margin

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  legend: {
    margin: {
      left: 20
    }
  },
  series: [
    { name: "Series 1", data: [1, 2, 3] },
    { name: "Series 2", data: [3, 4, 5] }
  ]
});
</script>

legend.margin.right Number (default: 0)

The right margin of the chart legend.

Example - set the chart legend right margin

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  legend: {
    margin: {
      right: 20
    }
  },
  series: [
    { name: "Series 1", data: [1, 2, 3] },
    { name: "Series 2", data: [3, 4, 5] }
  ]
});
</script>

legend.margin.top Number (default: 0)

The top margin of the chart legend.

Example - set the chart legend top margin

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  legend: {
    margin: {
      top: 20
    }
  },
  series: [
    { name: "Series 1", data: [1, 2, 3] },
    { name: "Series 2", data: [3, 4, 5] }
  ]
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy