Hello, I'm using Kendo UI for JQuery Diagram in Angular and I have a problem with the size.
I want the diagram to fit to its container, and I have the container height and width set to 100%.
When first initialized, the height and width of the "k-layer" div is automatically set to always 600px which does not fit to its container.
And when I resize the window manually, this "k-layer" size changes to fit to the container size.
My question is, how can I make this diagram to fit its container when initially loaded?
I tried calling kendo.resize("wrapper") when initially loaded, but this does not work.
FYI, I initialize the diagram in ngAfterViewInit().
Please see the screenshot I attached.
This screenshot shows the initial size is 600px.
And the code below is the code I use to initialize the diagram.
init:
function
(diagramElement, designerPanelWrapperElement) {
designerPanelWrapper = designerPanelWrapperElement;
diagram = diagramElement.kendoDiagram({
theme:
"default"
,
dataSource: {
data: [{
name:
"0"
,
items: [{
name:
"0"
}]
}],
schema: {
model: {
children:
"items"
}
}
},
shapeDefaults: {
width: 120,
height: 120,
fill:
"#8ebc00"
},
layout: {
type:
"tree"
,
subtype:
"right"
},
select:
function
(e) {
}
}).getKendoDiagram();
diagramElement.kendoDropTarget({
drop:
function
(e) {
var
item, pos, transformed;
if
(e.draggable.hint) {
item = e.draggable.hint.data(
"shape"
);
pos = e.draggable.hintOffset;
pos =
new
Point(pos.left, pos.top);
var
transformed = diagram.documentToModel(pos);
item.x = transformed.x;
item.y = transformed.y;
diagram.addShape(item);
}
}
});
kendo.resize(designerPanelWrapper);
}
hello
i try load view in kendowindow and it works on development but when deploy project on the server and then open kendowindow with view in content in production on iis, first open empty kendowindow and then as soon as possible whole browser became white and empty, even view content is just a div with short text.
this is my code
var window = $("#" + dialogName).kendoWindow({
content: {
url: "Security/Users",
dataType: "html"
},
title: name,
position: {
top: topOffset,
left:leftOffset
},
//width: 700,
//height: 400,
size: dialogSize,
actions: ["Refresh", "Minimize", "Maximize", "Close"],
animation: {
open: {
effects: "fade:in"
},
close: {
effects: "fade:out"
}
},
modal: false,
close: function (e) {
},
open: function (e) {
e.preventDefault();
closeDrawer();
}
}).open().center();
first and second images are from development environment and everything is ok, third image is from production environment and has bug.
Hello,
I am new to KendoUI web and using basic Jquery widget for uploading/dropping PDF file. I want to convert uploaded PDF file into Base64 string and then pass that data on to Restfull API(C#) to be saved in database.
I did not find a way to achieve this in this section of the forums. Can anyone please help on how to do this or point me into right direction please??
Sample code would be great help if anyone got it please !!
Thanks
The "GetItemCategories" returns data I would like to sort before displayed in the DropDownList.
How do I do the sorting?​
.Name("Category")
.DataTextField("Name")
.DataValueField("Value")
.HtmlAttributes(new { style = "width: 280px;" })
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetItemCategories", "Helper");
});
})
.Value(Model.ActionTimeFrameId.ToString())
)
Good afternoon,
We have an issue where the tooltip widget would hide when it shouldn't.
Please see:
https://dojo.telerik.com/oCuMidOL/5
If you hover over your mouse and then scroll the window, then the tooltip will hide (even though we have set autoHide: false).
How can we make this stay always visible? It should hide only if the "x" button is clicked.
many thanks
Alex
Hi,
the "previous" navigation button does not work in week or workWeek view. It works for day, month and agenda.
the "next" navigation button is fine, whereby i can still view the next week's schedule, just that after i navigate to the next week, i can't go back to the previous week. I have followed this https://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler/events/navigate
There is no error message in my case. Kindly assist me.
this is my code :
001.
$(
"#scheduler"
).kendoScheduler({
002.
editable:{
003.
destroy: can_delete,
004.
update : can_update,
005.
create : can_create,
006.
template : $(
"#schedulerTemplate"
).html(),
007.
},
008.
date :
new
Date(dtFrom),
009.
startDate:
new
Date(dtFrom),
010.
startTime:
new
Date(
new
Date(dtFrom).getFullYear(),
new
Date(dtFrom).getMonth(),
new
Date(dtFrom).getDate(),7, 0, 0, 0),
011.
selectable:
true
,
012.
height:
"max-height"
,
013.
views: [
014.
{type :
"day"
,
015.
selected:day_selected, allDaySlot:all_day_slot},
016.
{type :
"workWeek"
,
017.
selected: week_selected,
018.
allDaySlot:all_day_slot,
019.
workDays: days_to_print, title:
"Week"
},
020.
{type :
"month"
,
021.
selected : month_selected,
022.
adaptiveSlotHeight:
true
,
023.
eventSpacing: 5,
024.
eventsHeight: 55, },
025.
{type :
"agenda"
,
026.
selected : agenda_selected},
027.
028.
],
029.
toolbar: [
"pdf"
,
"search"
],
030.
pdf:{
031.
landscape:
true
,
032.
},
033.
dataSource : {
034.
035.
transport: {
036.
read : {
037.
url:
"/load_events_ajax_new/"
,
038.
data: {
039.
dtFrom: dtFrom,
040.
dtUntil: dtUntil,
041.
tz : G_timezone_offset,
042.
timezone: $(
'#searchTimezone option:selected'
).val(),
043.
},
044.
dataType:
"json"
,
045.
},
046.
update: {
047.
url:
"/update_events_ajax_new/"
,
048.
dataType:
"json"
,
049.
complete :
function
(){
050.
reload_data();
051.
},
052.
},
053.
destroy: {
054.
url:
"/delete_events_ajax_new/"
,
055.
dataType:
"json"
,
056.
complete :
function
(){
057.
reload_data();
058.
},
059.
},
060.
create : {
061.
url :
"/create_event_db/"
,
062.
dataType :
'json'
,
063.
complete :
function
(){
064.
reload_data();
065.
},
066.
},
067.
batch:
true
,
068.
},
069.
070.
schema: {
071.
data:
"events"
,
072.
model: {
073.
id:
"id"
,
074.
fields: {
075.
id: { from:
"id"
,type:
"number"
},
076.
title: { from:
"title"
, validation: { required:
true
} },
077.
start: { type:
"date"
, from:
"start"
},
078.
end: { type:
"date"
, from:
"end"
},
079.
description: { from:
"description"
},
080.
location: {from:
"location"
},
081.
creator: {from:
"creator"
},
082.
isAllDay : {type :
"boolean"
, from :
"isAllDay"
},
083.
recurrenceId: { from:
"recurrenceID"
},
084.
recurrenceRule: { from:
"recurrenceRule"
},
085.
recurrenceException: { from:
"recurrenceException"
},
086.
startTimezone: { from:
"StartTimezone"
},
087.
ownerId: {from:
"ownerId"
},
088.
089.
}
090.
}
091.
},
092.
filter: {
093.
logic:
"or"
,
094.
filters: [
095.
]
096.
}
097.
},
098.
navigate :
function
(e){
099.
reload_data();
100.
},
101.
resources: [
102.
{
103.
field:
"category_id"
,
104.
dataSource: category_datasource,
105.
multiple:
false
,
106.
title:
"Category"
107.
}
108.
],
109.
});
Want to change the position of series labels like attached image.
also label should not be on bar its should display the start of the both Plus and minus value bar.
And there are multiple charts show on tabs click and i want to target series labels position for only minus value bar
Dojo Ex : https://dojo.telerik.com/akuquKUJ/2