Edit this page

legend.background String (default: "white")

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

Example - set the chart legend background as a hex string

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

Example - set the chart legend background as a RGB value

$("#chart").kendoChart({
  legend: {
    background: "rgb(128, 0, 255)"
  },
  series: [
    { name: "Series 1", data: [1, 2, 3] },
    { name: "Series 2", data: [3, 4, 5] }
  ]
});
</script>

Example - set the chart legend background by name

$("#chart").kendoChart({
  legend: {
    background: "green"
  },
  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