resize
Adjusts the chart layout to match the size of the container.
Example
<div id="stock-chart" style="width: 400px; height: 300px;"></div>
<script>
var stockChart = $("#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: 15, volume: 1200 }
]
},
dateField: "date",
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}]
}).data("kendoStockChart");
// Resize container and update chart
$("#stock-chart").css({ width: "600px", height: "400px" });
stockChart.resize();
</script>
Parameters
force Boolean
optional
Defines whether the widget should proceed with resizing even if the element dimensions have not changed.
In this article