Edit this page

chartArea Object

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

chartArea.background String (default: "white")

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

Example - set the chart area background as a hex string

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

Example - set the chart area background as a RGB value

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

Example - set the chart area background by name

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

chartArea.border Object

The border of the chart area.

Example - set the chart area border

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

chartArea.border.color String (default: "black")

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

Example - set the chart area border color

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

chartArea.border.dashType String (default: "solid")

The dash type of the border.

The following dash types are supported:

  • "dash" - a line consisting of dashes
  • "dashDot" - a line consisting of a repeating pattern of dash-dot
  • "dot" - a line consisting of dots
  • "longDash" - a line consisting of a repeating pattern of long-dash
  • "longDashDot" - a line consisting of a repeating pattern of long-dash-dot
  • "longDashDotDot" - a line consisting of a repeating pattern of long-dash-dot-dot
  • "solid" - a solid line

Example - set the chart area border dash type

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

chartArea.border.width Number (default: 0)

The width of the border in pixels. By default the border width is set to zero which means that the border will not appear.

Example - set the chart area border width

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

chartArea.height Number (default: 400)

The height of the chart area.

Example - set the chart area height

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

chartArea.margin Number |Object (default: 5)

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

Example - set the chart area margin

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

chartArea.margin.bottom Number (default: 5)

The bottom margin of the chart area.

Example - set the chart area bottom margin

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

chartArea.margin.left Number (default: 5)

The left margin of the chart area.

Example - set the chart area left margin

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

chartArea.margin.right Number (default: 5)

The right margin of the chart area.

Example - set the chart area right margin

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

chartArea.margin.top Number (default: 5)

The top margin of the chart area.

Example - set the chart area top margin

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

chartArea.opacity Number (default: 1)

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

Example - set the chart area opacity

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

chartArea.width Number (default: 600)

The width of the chart area.

Example - set the chart area width

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