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

ChartArea

configuration

The chart area configuration options. Represents the entire visible area of the chart.

chartArea

Object
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  chartArea: {
    background: "lightblue",
    opacity: 0.8
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

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

Default: "white"

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

The border of the chart area.

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

The height of the chart area.

Default: 400

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  chartArea: {
    height: 200
  },
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>
Number|Object

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

Default: 5

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

The background opacity of the chart area. By default the background is opaque.

Default: 1

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

The width of the chart area.

Default: 600

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