chartAreaObject
The chart area configuration options. Represents the entire visible area of the chart.
Example - configure the chartArea
<div id="chart"></div> <script> $("#chart").kendoChart({ chartArea: { background: "lightblue", opacity: 0.8 }, series: [ { data: [1, 2, 3] } ] }); </script> chartArea.backgroundString(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.borderObject
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.colorString(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.dashTypeString(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.widthNumber(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.heightNumber(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.marginNumber|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.bottomNumber(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.leftNumber(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.rightNumber(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.topNumber(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.opacityNumber(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.widthNumber(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>