chartAreaObject

The chart area configuration options. This is the entire visible area of the chart.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5],
    chartArea: {
        background: "#f0f0f0",
        opacity: 0.8,
        border: {
            color: "#ff0000",
            width: 2
        }
    }
});
</script>

chartArea.backgroundString(default: "white")

The background color of the chart area.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5],
    chartArea: {
        background: "#ffe0e0"
    }
});
</script>

chartArea.opacityNumber(default: 1)

The background opacity of the chart area.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5],
    chartArea: {
        opacity: 0.5
    }
});
</script>

chartArea.borderObject

The border of the chart area.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5],
    chartArea: {
        border: {
            color: "#00ff00",
            width: 3,
            dashType: "dash"
        }
    }
});
</script>

chartArea.border.colorString(default: "black")

The color of the border.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5],
    chartArea: {
        border: {
            color: "#0000ff"
        }
    }
});
</script>

chartArea.border.dashTypeString(default: "solid")

The dash type of the border.

"solid"

Specifies a solid line.

"dot"

Specifies a line consisting of dots.

"dash"

Specifies a line consisting of dashes.

"longDash"

Specifies a line consisting of a repeating pattern of long-dash.

"dashDot"

Specifies a line consisting of a repeating pattern of dash-dot.

"longDashDot"

Specifies a line consisting of a repeating pattern of long-dash-dot.

"longDashDotDot"

Specifies a line consisting of a repeating pattern of long-dash-dot-dot.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5],
    chartArea: {
        border: {
            dashType: "dash"
        }
    }
});
</script>

chartArea.border.widthNumber(default: 0)

The width of the border.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5],
    chartArea: {
        border: {
            width: 3
        }
    }
});
</script>

chartArea.heightNumber(default: 400)

The height of the chart area.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5],
    chartArea: {
        height: 300
    }
});
</script>

chartArea.marginNumber|Object(default: 2)

The margin of the chart area.

Example

js
// sets the top, right, bottom and left margin to 3px.
margin: 3

// sets the top and left margin to 1px
// margin right and bottom are with 5px (by default)
margin: { top: 1, left: 1 }

chartArea.widthNumber(default: 600)

The width of the chart area.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5],
    chartArea: {
        width: 500
    }
});
</script>