I tried to use the tooltip,in my test project,and it says object doesn't support property or method 'kendoToolTip" !
what do i need to work the tooltip?
the jquery is referenced.the kendo.mvc.dll is there...so?
A sample code is below
<div width="100" id="example">some text</div>
@(Html.Kendo().Tooltip()
.For("#example")
.Content("hello")
.Position(TooltipPosition.Top)
.Width(120)
)
Regards,
Daniel
6 Answers, 1 is accepted
Could you please verify that the kendo scripts are included and the correct version (Tooltip widget is available with Q1 2013 release) is used. Here you can find additional information on this matter.
If you continue to experience difficulties, you should provide a small runnable sample in which this issue can be observed locally.
Rosen
Telerik
usually what do i have to copy in order to have the new features,and use a new control for example?
copy everything from tha package into the project?
Regards,
Daniel
The easiest way to upgrade a Kendo UI for ASP.NET MVC Application is via our VisualStudio extensions as described here.
Regards,Rosen
Telerik
Hello,
I'm working on an ASP.NET MVC 4 project developed using C# and Visual Studio 2010
I'm trying to add tooltips, zoom and drag features to my kendo Chart defined as follows:
- JavaScript:
createChart:
function
() {
var
$
this
=
this
;
$(
"."
+ $
this
.chartContainerID).kendoChart({
//renderAs: "canvas",
dataSource: {
data: barData,
value:
"#={0}!=null"
},
panes: [{
title:
"Future / Cash"
,
height: 300
}, {
name:
"premiumPane"
,
title:
"Premium"
,
padding:
"3"
,
height: 120
}],
categoryAxis: {
pane:
"premiumPane"
},
valueAxis: [{
// Default axis
line: {
visible:
false
},
labels: {
format:
"${0}"
}
}, {
// Premium Axis
name:
"premiumAxis"
,
pane:
"premiumPane"
,
visible:
true
,
narrowRange:
true
,
labels: {
step: 3
}
}],
series: [{
// Candlestick serie
type:
"candlestick"
,
openField:
"open"
,
highField:
"high"
,
lowField:
"low"
,
closeField:
"close"
,
color:
"green"
,
downColor:
"red"
,
opacity: 0.3,
line: {
opacity: 0.8,
color:
"black"
},
tooltip: {
visible:
true
,
format:
"{4}<br />Open: {0:C}<br />High: {1:C}<br />Low: {2:C}<br />Close: {3:C}"
}
}, {
// Cash price serie
type:
"line"
,
name:
"Cash Price"
,
missingValues:
"interpolate"
,
field:
"cash"
,
color:
"rgb(70, 80, 140)"
,
opacity: 1,
tooltip: {
visible:
true
,
template:
"#= kendo.format('{0:dd/MM/yyyy}', category) # <br /> Cash Prix: #= kendo.format('{0:C}',value) #"
}
}, {
// Premium serie
type:
"line"
,
field:
"prim"
,
axis:
"premiumAxis"
,
tooltip: {
visible:
true
,
template:
"#= kendo.format('{0:dd/MM/yyyy}', category) # <br /> Premium Prix: #= kendo.format('{0:C}',value) #"
}
}
],
categoryAxis: {
categoryField:
"date"
,
field:
"date"
,
baseUnitStep:
"auto"
,
missingValues:
"interpolate"
,
labels: {
step: 20
// Render every second label
}
},
legend: {
position:
"top"
},
transitions:
false
,
drag: $
this
.onDrag,
dragEnd: $
this
.onDragEnd,
zoom: $
this
.onZoom
});
},
// Drag handler
onDrag:
function
(e) {
debugger;
var
chart = e.sender;
var
ds = chart.dataSource;
var
delta = Math.round(e.originalEvent.x.initialDelta / DRAG_THR);
if
(delta != 0) {
newStart = Math.max(0, viewStart - delta);
newStart = Math.min(barData.length - viewSize, newStart);
ds.query({
skip: newStart,
page: 0,
pageSize: viewSize,
sort: SORT
});
}
},
onDragEnd:
function
() {
debugger;
viewStart = newStart;
},
// Zoom handler
onZoom:
function
(e) {
debugger;
var
chart = e.sender;
var
ds = chart.dataSource;
viewSize = Math.min(Math.max(viewSize + e.delta, MIN_SIZE), MAX_SIZE);
ds.query({
skip: viewStart,
page: 0,
pageSize: viewSize,
sort: SORT
});
// Prevent document scrolling
e.originalEvent.preventDefault();
}
- DataSource:
[quote]var barData = [
{ day: 1, date: "2015/05/01", open: 13, high: 19, low: 9, close: 16, cash: 18, prim: 2 },
{ day: 2, date: "2015/05/02", open: 14, high: 16, low: 11, close: 16, cash: 18, prim: 2 },
{ day: 3, date: "2015/05/03", open: 16, high: 21, low: 12, close: 18, cash: 16, prim: -2 },
{ day: 4, date: "2015/05/04", open: 18, high: 40, low: 11, close: 30, cash: 33, prim: 3 },
{ day: 5, date: "2015/05/07", open: 30, high: 45, low: 26, close: 40, cash: 42, prim: 2 },
{ day: 6, date: "2015/05/08", open: 40, high: 80, low: 30, close: 70, cash: 66, prim: -4 },
{ day: 7, date: "2015/05/09", open: 70, high: 80, low: 40, close: 55, cash: 57, prim: 2 },
{ day: 8, date: "2015/05/10", open: 55, high: 65, low: 11, close: 30, cash: 35, prim: 5 },
{ day: 9, date: "2015/05/11", open: 30, high: 45, low: 16, close: 20, cash: 18, prim: -2 },
{ day: 10, date: "2015/05/12", open: 30, high: 45, low: 16, close: 20, cash: 18, prim: -2 },
{ day: 11, date: "2015/05/13", open: 40, high: 80, low: 30, close: 70, cash: 66, prim: -4 },
{day: 14, date: "2015/05/16", open: 30, high: 45, low: 23, close: 40, cash: 43, prim: 4 },
{ day: 15, date: "2015/05/17", open: 40, high: 80, low: 30, close: 70, cash: 73, prim: 3 },
{ day: 16, date: "2015/05/18", open: 70, high: 80, low: 40, close: 55, cash: 56, prim: 1 },
{ day: 17, date: "2015/05/19", open: 55, high: 65, low: 11, close: 30, cash: 33, prim: 3 },
{ day: 18, date: "2015/05/20", open: 30, high: 45, low: 26, close: 40, cash: 42, prim: 2 },
{ day: 19, date: "2015/05/21", open: 40, high: 80, low: 30, close: 70, cash: 72, prim: 2 },
{ day: 20, date: "2015/05/22", open: 70, high: 80, low: 40, close: 55, cash: 57, prim: 2 },
{ day: 21, date: "2015/05/23", open: 70, high: 80, low: 40, close: 55, cash: 56, prim: 1 },
{ day: 22, date: "2015/05/24", open: 55, high: 65, low: 11, close: 30, cash: 33, prim: 3 },
{ day: 23, date: "2015/05/25", open: 30, high: 45, low: 26, close: 40, cash: 42, prim: 2 },
{ day: 24, date: "2015/05/26", open: 40, high: 80, low: 30, close: 70, cash: 72, prim: 2 },
{ day: 25, date: "2015/05/27", open: 70, high: 80, low: 40, close: 55, cash: 57, prim: 2 },
{ day: 26, date: "2015/05/28", open: 55, high: 65, low: 11, close: 30, cash: 33, prim: 3 },
{ day: 27, date: "2015/05/29", open: 30, high: 45, low: 26, close: 40, cash: 42, prim: 2 },
{ day: 28, date: "2015/05/30", open: 40, high: 80, low: 30, close: 70, cash: 72, prim: 2 },
{ day: 29, date: "2015/05/31", open: 70, high: 80, low: 40, close: 55, cash: 57, prim: 2 },
];[/quote]
My issue is that tooltips, zoom and drag features are not displayed / working. Please note that the charts are well displayed (see "ForumKendoChart.PNG").
Could anyone help me, please?
Thanks.
Regards,
Hello Nadhir,
I'm not sure how your question is related to this thread's topic of discussion. Could you please open a separate support request providing the required information.
Regards,Rosen
Telerik