Hi Telerik-Team,
I want to implement a Stock chart in a Frontend(WebForm .aspx) like your "Virtualization"-Demo (http://demos.kendoui.com/dataviz/financial/virtualization.html).
In my implementation, the Navigator should give me the possibility to choose a from-to range, that should be displayed more detailed in the top chart.
--------------------------------------
1. By calling a handler(via Ajax), the Frontend get a JSON response (Mulitdimension array). -->JSON.jpg
2. the JSON is displayed correct in the top chart.
3. BUT the navigator is not showing any graph! :-/--->StockchartScreenshot.jpg
Do you see any wrong coding by me or know what could be the cause?
P.s.: When I`m using the newst (.716) version of KendoUI, the top graph is not displayed too.
------------------------------------
Here is a Code snippet.
1. After onClick() the CallHandler funtion is called
2. when success-->OnComplete() the data are set to the stocks var and the chart is created.
3. the series is displayed but not the navigator series.
Thank you.
Regards
I want to implement a Stock chart in a Frontend(WebForm .aspx) like your "Virtualization"-Demo (http://demos.kendoui.com/dataviz/financial/virtualization.html).
In my implementation, the Navigator should give me the possibility to choose a from-to range, that should be displayed more detailed in the top chart.
--------------------------------------
1. By calling a handler(via Ajax), the Frontend get a JSON response (Mulitdimension array). -->JSON.jpg
2. the JSON is displayed correct in the top chart.
3. BUT the navigator is not showing any graph! :-/--->StockchartScreenshot.jpg
Do you see any wrong coding by me or know what could be the cause?
P.s.: When I`m using the newst (.716) version of KendoUI, the top graph is not displayed too.
------------------------------------
Here is a Code snippet.
1. After onClick() the CallHandler funtion is called
2. when success-->OnComplete() the data are set to the stocks var and the chart is created.
3. the series is displayed but not the navigator series.
<
script
>
$(document).ready(function () {
createChart();
// create DatePicker from input HTML element
$("#datepicker").kendoDatePicker({
culture: "en-GB",
format: "MM/dd/yyyy"
});
});
function CallHandler() {
$.ajax({
url: "Handler/Handler.ashx",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: { 'date': document.getElementById("datepicker").value },
responseType: "json",
success: OnComplete,
error: OnFail
});
return false;
};
var stocks = [[], [],[]];
function OnComplete(result) {
stocks = result;
createChart();
document.getElementById("testfeld").innerHTML = "";
}
function OnFail() {
document.getElementById("testfeld").innerHTML = "Some error has occured
";
}
function createChart() {
$("#stock-chart").kendoStockChart({
title: {
text: "Carna v 0.1"
},
legend: {
visible: true,
position: "bottom"
},
chartArea: {
background: ""
},
series: [{
name: "line1",
type: "line",
width: 1,
color: "Orange",
data: stocks[1],
markers: { visible: false }
},
{
name: "line2",
type: "line",
width: 1,
color: "Green",
data: stocks[2],
markers: { visible: false }
}
],
tooltip: {
visible: true,
format: "{0}",
template: "#= series.name #: #= value #"
},
valueAxis: {
labels: {
format: "{0}"
},
line: {
visible: false
},
axisCrossingValue: 0
},
dateField: stocks[0],
categoryAxis: {
step: 1,
categories: stocks[0],
majorGridLines: {
visible: true
},
field: stocks[0],
type: "Category",
baseUnit: "minutes",
labels: {
step: 10,
font: "6.25pt Verdana",
rotation: -45
},
title: {
text: "Time",
font: "6.25pt Verdana"
}
},
navigator: {
series: [{
type: "line",
data: stocks[1],
color: "Orange",
name: "line1 overview",
visibleInLegend: true
},
{
type: "line",
data: stocks[2],
color: "green",
name: "line2 overview",
visibleInLegend: true
}]
}
});
}
</
script
>
Thank you.
Regards