Telerik Forums
Kendo UI for jQuery Forum
1 answer
1.1K+ views
So I have a graph with multiple series.

.Series(series => {
     series.Line(model => model.SentFiles).Name("Sent");
     series.Line(model => model.ReceivedFiles).Name("Received");
     series.Column(model => model.SentFiles).Name("Sent Data");
     series.Column(model => model.ReceivedFiles).Name("Received Data");
     series.Area(model => model.ReceivedFiles).Name("Received Data").Labels(false);
     series.Area(model => model.SentFiles).Name("Sent Data").Labels(false);
})

because I want my users to be able to show and hide multiple different types of data in 1 graph

I have worked out how to hide series

for (var i = 0, length = series.length; i < length; i++) {
     series[i].stack = stack;
     series[i].visible = (types.indexOf(series[i].type) != -1);
};

however the legend for the series just "grays out".

I want to be able to show and hide the legend as I show and hide the series.

can you please advise how I can achieve this.

Thanks

*** EDIT  ***

Ok so my initial problem was hiding the legends dynamically, this has been solved.
However, I now have the issue of setting the initial setup of the series and legends...

So I can do the following

.Series(series =>
{
     series.Line(model => model.SentFiles).Name("Sent");
     series.Line(model => model.ReceivedFiles).Name("Received");
     series.Column(model => model.SentFiles).Name("Sent Data").Visible(false);
     series.Column(model => model.ReceivedFiles).Name("Received Data").Visible(false);
     series.Area(model => model.ReceivedFiles).Name("Received Data").Visible(false);
     series.Area(model => model.SentFiles).Name("Sent Data").Visible(false);
})

which will hide the series, but the legends for those are viewable ("grayed out"). I want a way to initially hide the legends.

I would prefer not having to call a js method on Document.Ready to then hide series

I would have thought if this functionality is available through the JS api that this should be a configurable setting.

Thanks in advance
Luke
Top achievements
Rank 1
 answered on 13 Dec 2013
5 answers
147 views
Hi,

I am relatively new to web development, so please allow me a maybe stupid question. I searched here and with google, but did not come closer to the answer...

Kendo says it is a HTML5 framework. Ok, fine. Now, I did an application with Kendo, and it runs in old browsers, too. So, somehow it cannot really be HTML5. I am just confused: Is there some kind of migration in the background? Or how can you say Kendo is HTML5, when it actually all I get (and all I want) is HTML4?

Thanks!
Vladimir Iliev
Telerik team
 answered on 13 Dec 2013
1 answer
102 views
Hi,
Please refer to the foloowing HTML snippet. I have added the kendo and jquery references properly.
When I remove the percentage values the validator function works properly. But when it is set to percentage it will not work Please help. Thanks in advance
Regards,
Vijay


   <div style="width: 90%; height: 8%; float: left;">
<label id="lblUserName" class="LoginLabel required" for="UserName">
Username:
</label>
</div>
<div style="width: 90%; height: 16%; float: left;">
<input id="txtUserName" type="text" maxlength="100" class="LoginTextBox" 
name="UserName"   placeholder="UserName" required validationmessage="Please enter {0}" />
</div>
Kiril Nikolov
Telerik team
 answered on 13 Dec 2013
1 answer
72 views
Similar to your demo I want to have a keno mobile app inside a iframe and when a page loads I don't want the page to jump to the top of the app when I supply an initial page to the kendoMobile initialization method.

Any insight on embedding an app in an iframe on a page and not having the page jump. I see in the code on the site you are not supplying an initial view. Is there any other way?
Petyo
Telerik team
 answered on 13 Dec 2013
1 answer
351 views
I'm working on handling transport.update as a function function that writes the values to localStorage rather than a remote server.   I can't seem to get the framework to unmark the object as "dirty"... and as a result the transport.update continues to fire on every .sync() call.

I've tried all of the following approaches but the item always retains dirty = true.

manually marking dirty = false:
transport{
                update: function (options) {
                    localStorage[options.data.id] = kendo.stringify(options.data);
                    var theTask = ds.get(options.data.id);
                    theTask.dirty = false;
                    options.success(theTask);
                }
}

returning the raw data:
transport{
                update: function (options) {
                    localStorage[options.data.id] = kendo.stringify(options.data);
                    options.success(options.data);
                }
}

returning nothing:
transport{
                update: function (options) {
                    localStorage[options.data.id] = kendo.stringify(options.data);
                }
}


Kiril Nikolov
Telerik team
 answered on 13 Dec 2013
2 answers
225 views
hi kendo

data-transition is not working when using external html page in anchor tag:
<a data-icon="cart" data-rel="external" href="test.html" data-transition="slide"/>

thanks
Petyo
Telerik team
 answered on 13 Dec 2013
1 answer
338 views
I saw it mentioned that chart annotations are now possible. Just trying to find an example of how to use it.

Maybe annotation isn't the correct term for what I'm trying to do, but basically I need to add some sort of a marker line to a chart that is associated with some text. So I can specify that something happened at a certain point in the timeline.

See attached image for what I mean. 
Iliana Dyankova
Telerik team
 answered on 13 Dec 2013
1 answer
101 views
what options are available for managing the views that get displayed when a user presses the "back" button on their phone? We have a script with a login/logout, and can't have the ability to press "back" to a previous view after the user logs out. The app resets at that point, but the history object is still active.
Petyo
Telerik team
 answered on 13 Dec 2013
4 answers
277 views
I could have two clients editing the same page and want the changes adjusted immediately without refreshing the data source.

The listview is setup fairly normally. It feeds of a data source and in turn sends updates through a MVC controller update.

When the MVC action processes the update it notifies connected users to the group of the change(s) to items. This notification is the same response that the JSON Result responds with effectively.

Updating all clients is close to working:
Scenario 1: Client 1 and 2 goto the same page. Client 1 edits a field and those changes are reflected on client 2's screen.
Scenario 2: Client 1 and 2 edit the same row. Any saved changes by either are updated to the others edit fields.

The problem im getting is when Client 2 begins editing a different row. When it goes to Client 1 it is more seen as the edit state of the data row. A little more challenging to understand what i mean.
So yes... im more hiting my way through the data source to have my changes there. The SignalR function will seek out the row(s) to update and run:

01.for (var i = 0; i < menuItems.length; i++)
02.{
03.    var item = menuItems[i];
04.    var dataSourceItem = this.findById(item.Id);
05.    if (!dataSourceItem) { continue; }
06. 
07.    var thumbArray = new kendo.data.ObservableArray(item.Thumbs)
08.    dataSourceItem.set("WebName", item.WebName);
09.    dataSourceItem.set("WebDescription", item.WebDescription);
10.    dataSourceItem.set("Thumbs", thumbArray);
11.    //however each item is now dirty ... and i don't want to send off them again to be saved.
12.    dataSourceItem.dirty = false;
13.}
14.if (this.dataSource.hasChanges()) {
15.    //this should always be a no now.
16.    console.log("has changes");
17.}
this.findById is digging through the kendoDataSource.data() method and returning the correct item.

How can I update the data item in the data source and have it think its the pristine saved version after the signalr update? As client 1 and 2 sort of move into a protective - only display saved changes mode once editing has started. Clicking on update on a modified row by a different client will have the correct signalr pushed values but they are not on the item display template.

Best Regards,
Matt
Matt
Top achievements
Rank 1
 answered on 12 Dec 2013
5 answers
96 views
Hi There,

I've updated to the 2013.3.1119 of Kendo UI Mobile and now when an action sheet is opened from a tab strip it closes immediately.

You can see a sample of this behavior here:

http://jsbin.com/oJaKiHU/6/edit

Just click the action button and notice how the action sheet closes immediately.

Are there any workarounds for this?

Thanks,

Robert
Kiril Nikolov
Telerik team
 answered on 12 Dec 2013
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?