Telerik Forums
Kendo UI for jQuery Forum
0 answers
125 views
I'm having an issue with binding a json file to my chart. I am attempting to have a multi axes chart with stacked and grouped columns. I have it working with static data but cannot get it to work with the dataSource json file. I believe I need to be able to filter the datasource differently for each series. I've included a sample of the function, am I going about this wrong?

$("#ApplesOrangesChart").kendoChart({
theme: $(document).data("kendoSkin") || "default",
datasource: {
transport: {
read:  "testjson.json",
},
sort: {
field: "MonthNumber",
dir: "asc"
},
},
title: {
text: "Apples to Oranges 2011 vs 2012",
},
legend: {
visible: true,
position: "bottom",
},
seriesDefaults: {
type: "column",
},
series: [{
name: "2011 Apples",
stack: "2011",
axis: "monthly",
field: "AppleValue",
filter: { field: "Year", operator: "eq", value: 2011 },
}, {
name: "2011 Oranges",
stack: "2011",
axis: "monthly",
field: "OrangeValue",
filter: { field: "Year", operator: "eq", value: 2011 },
}, {
name: "2012 Apples",
stack: "2012",
axis: "monthly",
field: "AppleValue",
filter: { field: "Year", operator: "eq", value: 2012 },
}, {
name: "2012 Oranges",
stack: "2012",
axis: "monthly",
field: "OrangeValue",
filter: { field: "Year", operator: "eq", value: 2012 },
},{
type: "line",
axis: "cumulative",
field: "CumlativeValue",
filter: { field: "Year", operator: "eq", value: 2011 },
name: "2011 Cumulative",
}, {
type: "line",
axis: "cumulative",
field: "WonCumlativeValue",
filter: { field: "Year", operator: "eq", value: 2012 },
name: "2012 Cumulative",
}],
valueAxis: [{
name: "monthly",
title: {text: "Monthly"},
labels: {
template: "#= kendo.format('{0:N0}', value / 1000) # M"
},
},
{
name: "cumulative",
title: {text: "Cumulative"},
labels: {
format: "C"
},
}],
categoryAxis: {
categories: ["Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sep", "Oct", "Nov", "Dec"],
majorGridLines: {
visible: false
},
},
});
Cody
Top achievements
Rank 1
 asked on 20 Aug 2012
9 answers
125 views
Hi,

I'm having a problem with Kendo Grids and Adobe Air.

When I create a new DataSource (let's call it DS) and then set it to a Grid when the page is loading (document ready), it works great  and  the grid is correctly populated.

But I try to do it after page load, I get the following error:

Error: Invalid template:'<tr data-uid="#=uid#"><td >${locationName}</td><td >${answered}</td><td>${unanswered}</td><td >${total}</td></tr>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<trdata-uid="'+(uid)+'"><td >'+(e(locationName))+'</td><td >'+(e(answered))+'</td><td >'+(e(unanswered))+'</td><td >'+(e(total))+'</td></tr>';}return o;'

So I thought I could just create a row template, and I did it with:

<script id="feeds-template" type="text/x-kendo-tmpl"><tr><td>${ locationName }</td><td>${ answered }</td><td>${ unanswered }</td><td>${ total }</td></tr></script>

And the error give is very similar. I then proceeded to create a "dumb" template in order to test everything thoroughly, and did as follows:

<script id="feeds-template" type="text/x-kendo-tmpl"><tr><td>1</td><td>2</td><td>3</td><td>4</td></tr></script>

Which produces the following error:

Error: Invalid template:'<tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>';}return o;'

I started digging in Adobe Air configuration, since it could the source of error, and found the following: 

Adobe Air Security Issues

So basically Adobe Air does not support eval (which I believe is used for the templating system).

Is there any workaround for this issue?

Tks,

HL
Oscar
Top achievements
Rank 1
 answered on 20 Aug 2012
1 answer
75 views
Hi everyone,
I have a strange issue.
I am loading my kendo mobile app in iframe and the some css isn't applied and the tab button images are not showing up(just blank buttons). This seems happening on the initial loading and if I hit F5 to refresh the page, it then shows ok.

This happens in Chrome and the url is http://www.bookingbay.net

The reason I do this is basically to allow users to use the app on browsers as well as the mobile devices. It detects the http header to see if the user is connecting from the desktop browsers and if so it redirects the desktop users to the desktop.html page which does this iframing to enclose the app into smaller real estate.

Anyone experienced similar issues? Thanks in advance,

Warm regards,

John Choi

Joon
Top achievements
Rank 1
 answered on 20 Aug 2012
1 answer
97 views
Hi guys,
Great job with the UI and Keep on the good work.
I have a thought about the Url when I combine using the grid filterable, groupable etc very unclean.
And my question is that there are some ways I can make the Url little cleaner somehow ? 

http://localhost:55517/Assignment/Completed?Grid-page=1&Grid-orderBy=~&Grid-groupBy=CreatorCaption-asc&Grid-filter=~&Grid-size=10 

Regards

Your Unique Customer ID is: RM917591
Mike
Top achievements
Rank 2
 answered on 20 Aug 2012
1 answer
717 views
Hi,
1) I am using the following code in the Change event:
@(Html.Kendo().DropDownListFor(m => m.Page.PageSource)
                          .DataTextField("Text")
                          .DataValueField("Value")
                          .BindTo(Model.PageSourceList)
                          .Value(Model.Page.PageSource)
                          .Enable(!Model.Page.IsSystem)
                          .HtmlAttributes(new { id = "source" })
                          .Events(e=>e.Change(@<text>
                          function(e) {
                            alert(e.item);
                          }</text>)))

and I get "undefined" when I change the item in the select list.

2) Is there a way to have this event fire initally when the page loads?

Thank you,
David A
Georgi Krustev
Telerik team
 answered on 20 Aug 2012
3 answers
256 views
Is there a way to detect that the user has scrolled to the end of the list so that more list items can be loaded from a remote datasource for example?

Ideally, since the Kendo Datasource framework already supports paging, the ListView should just auto-detect that the list needs to load the next page of records when the user scrolls to the end of the list items currently loaded.
Georgi Krustev
Telerik team
 answered on 20 Aug 2012
1 answer
196 views

It's a bug that I also reproduced on your site

First enter this date in the date picker: August 31, 2012
- With the date picker calendar, click on header to display the 12 month
- Select November

The month that appears is December's

The problem is, if the date display at first is a 31 and the month you select have only 30 day, he display the next month.

 

Georgi Krustev
Telerik team
 answered on 20 Aug 2012
1 answer
2.1K+ views
How do I make a chart axis label (or any chart label for that matter) bold?  If I apply font: "bold" to my categoryAxis: { labels: {} }, it just moves the labels around a bit and definitely doesn't make them bold (I'm using IE9).  I can't use the templates because they don't seem to support HTML markup.  All I really want to do is keep all the other styles the same, just apply font-weight: bold;

Thanks!
Hristo Germanov
Telerik team
 answered on 20 Aug 2012
1 answer
210 views
I've a pop-up editing grid with custom pop up template. This works find for Edit/Add button clicks.

In grid I've a hyperlink column defined like below:
{field:"Count", title:"Settings", filterable: false, width: 100, 
    template:'<a href="\\#" onlick="editSettings();">#=Count#</a>'

But the JS method editSettings() is not invoked.

In the JS method I want to show a modal popup defined on the page. Any ideas what's wrong?
Thanks.
Just
Top achievements
Rank 1
 answered on 20 Aug 2012
1 answer
108 views
seriesDefault.gap doesn't appear to be working.  I have to specify the gap on the series in order to have any effect.  In my relatively simple example,
            seriesDefaults: {
                type: "bar",
                stack: true,
                labels: {
                    visible: true,
                    position: "insideBase",
                    format: "c0"
                }
            },
            series: [{
                field: "Amount",
                gap: 0.3
            }],

works, but
            seriesDefaults: {
                type: "bar",
                stack: true,
                labels: {
                    visible: true,
                    position: "insideBase",
                    format: "c0"
                },
                gap: 0.3
            },
            series: [{
                field: "Amount"
            }],

does not.
Hristo Germanov
Telerik team
 answered on 20 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?