ChartArea
configurationThe chart area configuration options. This is the entire visible area of the chart.
chartArea
Object<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
{ date: "2012/01/02", open: 12, high: 18, low: 10, close: 16, volume: 1500 }
]
},
dateField: "date",
chartArea: {
background: "lightblue",
width: 800,
height: 500
},
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}]
});
</script>
chartArea.background
StringThe background color of the chart area.
Default: "white"
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
{ date: "2012/01/02", open: 12, high: 18, low: 10, close: 16, volume: 1500 }
]
},
dateField: "date",
chartArea: {
background: "#f0f0f0"
},
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}]
});
</script>
chartArea.border
ObjectThe border of the chart area.
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
{ date: "2012/01/02", open: 12, high: 18, low: 10, close: 16, volume: 1500 }
]
},
dateField: "date",
chartArea: {
border: {
color: "red",
width: 3,
dashType: "dash"
}
},
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}]
});
</script>
chartArea.height
NumberThe height of the chart area.
Default: 400
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
{ date: "2012/01/02", open: 12, high: 18, low: 10, close: 16, volume: 1500 }
]
},
dateField: "date",
chartArea: {
height: 600
},
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}]
});
</script>
chartArea.margin
Number|ObjectThe margin of the chart area.
Default: 5
pseudo
// 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.opacity
NumberThe background opacity of the chart area.
Default: 1
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
{ date: "2012/01/02", open: 12, high: 18, low: 10, close: 16, volume: 1500 }
]
},
dateField: "date",
chartArea: {
background: "lightblue",
opacity: 0.5
},
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}]
});
</script>
chartArea.width
NumberThe width of the chart area.
Default: 600
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
{ date: "2012/01/02", open: 12, high: 18, low: 10, close: 16, volume: 1500 }
]
},
dateField: "date",
chartArea: {
width: 800
},
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}]
});
</script>
Related Members
- chartArea.border - The border of the chart area.