I have the pageable as true for my grid. But when I select such as page 3. The number 3 will show at the beginning before other page numbers. Do you know how to avoid that display? Thanks.
Hi guys,
in my scenario I show only one day - view as we use the scheduler for building complex agendas with many rooms. When an user adds (or edits existing event) at the bottom of the custom edit box is an option to move the session to another day. If user selects other day and clicks on the save button on the controller we change start/end date of the session and save that to the database
var item = eventService.GetAgendaDay(sesssion.EventAgendaDayId); //selected id of the another day
//changing start/end date
sesssion.Start = new DateTime(item.Date.Year, item.Date.Month, item.Date.Day, sesssion.Start.Hour, sesssion.Start.Minute, sesssion.Start.Second);
sesssion.End = new DateTime(item.Date.Year, item.Date.Month, item.Date.Day, sesssion.End.Hour, sesssion.End.Minute, sesssion.End.Second);
and once we perform the save option we return the session back
return Json(new[] { sesssion }.ToDataSourceResult(request, ModelState));
At this moment, the newly created session/or edited belongs to the another day and it should not be visible anymore on the screen, but it is. that is reason why I'm asking how to manualy refresh the source after save
thanks
I am retrieving the start date of my Scheduler like this:
function get_date() {
var scheduler = $("#scheduler").data("kendoScheduler");
var view = scheduler._selectedView;
var startDate = view._startDate;
return startDate;
}
I am trying to pass that date via ajax in order to populate my dropdownlist:
$("#drpHall").kendoDropDownList({
dataTextField: "hallname",
dataValueField: "hallid",
dataSource: {
transport: {
read: {
url: "chart_functions.cfc?method=GetHalls&returnformat=json",
data : {
dt: get_date()
},
dataType: "Json"
,success : function(result) {
alert(JSON.stringify(result));
}
}
}
, pageSize:10
},
index: 0
});
I am using the function get_date(), but the dropdownlist does not render when I do this. If I replace it with a simple "new Date()" parameter instead, the control renders (but obviously using the wrong date).
What do I need to do to pass that scheduler date properly?
Thanks!
The color associated to each legend is taken from defaults color. we are using group field under data source to display category value as legends.
How to set legend color in bubble chart?
Hi,
I have a line chart with a x-axis based on time. Since there are multiple measures for each month, I'm just showing the label for the first day of each month. But I'm having trouble with the majorGridLines property. If I set it to true, all the lines are shown (attached figure 1). Another possibility is to show the grid lines in steps of 30, but of course, since each month has a different number of days, some values are shown in the wrong x-axis label...
Is there a way to align the majorGridLines with the custom labels?
Here is my code:
samples.forEach((s:any) => s.date = s.date.toDate());
this.panes.push({
clip: false,
name: 'samples'
});
this.categoryAxis.push({
name: 'samples',
pane: 'samples',
labels: {
visible: true,
template: "#= value.getDate() == 1 ? kendo.toString(value, 'MMMM') : '' #",
step: 1
},
majorGridLines: {
visible: true,
//step: 30
},
majorTicks: {
visible: false
},
minorGridLines: {
visible: false
},
justified: true,
baseUnit: 'days'
});
this.valueAxis.push({
name: 'samples',
pane: 'samples',
visible: true
});
let variables = Helpers.distinctInArray(samples, (i: MonitorSample) => i.variable);
variables.forEach(v => {
let filteredSamples = samples.filter(s => s.variable == v);
this.series.push({
name: v,
type: 'line',
line: {
style: 'smooth'
},
field: 'value',
categoryField: 'date',
axis: 'samples',
categoryAxis: 'samples',
data: filteredSamples,
tooltip: {
visible: true,
template: '#=value# #=category#'
}
})
});
Hello.
Is there any way to export Chart component as a pdf file?
I haven't found any method on the Cart itself. There's nothing close to "saveAsPDF".
I tried following way:
import { ChartComponent } from '@progress/kendo-angular-charts';
import { drawDOM, exportPDF, pdf } from '@progress/kendo-drawing';
drawDOM(kendoChart.element.nativeElement, {
paperSize: 'auto',
margin: { left: '1cm', top: '1cm', right: '1cm', bottom: '1cm' }
})
.then(function (group) {
pdf.saveAs(group, 'SomeFile.pdf');
});
When I render a chart as a canvas, it works fine, but the chart itself doesn't look great in the browser. When I render the chart in svg mode, I get an empty pdf document.
Could you give me a hint on how to resolve this problem? I need svg Chart exported to .pdf.