Telerik Forums
Kendo UI for jQuery Forum
3 answers
1.8K+ views
I've been able to accomplish such grouping in certain charts and not others.
For example, assume that I have a datasource that looks something like this:

var pictures = [
{ type: "JPG", len: 20, wid: 15, appr: 17.5, count: 2 },
{ type: "JPG", len: 22, wid: 17, appr: 12.5, count: 3 },
{ type: "JPG", len: 24, wid: 15, appr: 10.5, count: 1 },
{ type: "JPG", len: 22, wid: 4, appr: 17.5, count: 6 },
{ type: "PNG", len: 20, wid: 15, appr: 17.5, count: 4 },
{ type: "PNG", len: 25, wid: 7, appr: 9.5, count: 4 },
{ type: "PNG", len: 21, wid: 11, appr: 21.5, count: 1 }
];


I want to group by my category which in this case is "type", I want to sum all other fields.

I am able to do this quite simply with column charts, simply by setting:

series: [{aggregate: "sum",categoryField: "type"}]

However, this does not work with bullet or pie charts, so in search
of a more universal method. I "massage" the data first by adding this
at the beginning:

var dataSource = new kendo.data.DataSource({
data: pictures,
group: {
field: "type",
aggregates: [
{ field: "len", aggregate: "sum" },
{ field: "wid", aggregate: "sum" }
]
}
});
 
dataSource.read();


I don't know why just grouping the datasource isn't enough.. I
have to throw it into arrays and assign each array to a series like so:

var seriesA = [],
seriesB = [],
categories = [],
items = dataSource.view(),
length = items.length,
item;
 
for (var i = 0; i < length; i++) {
item = items[i];
 
seriesA.push(item.aggregates.wid.sum);
seriesB.push(item.aggregates.len.sum);
}

This works as long as having only one valueField per series works.
In the case of a bullet chart, or if I want to assign a field to a
plotband to a bar/column chart: it does not.

I believe I must be doing something completely wrong, as converting
my ungrouped JSON object to a grouped kendo datasource should be enough.
Below is my JSFiddle..

http://jsfiddle.net/DxMb8/4/

Any help would be greatly appreciated! thanks!

Stephen
Top achievements
Rank 1
 answered on 23 Oct 2013
2 answers
107 views


Hi there,

I am working on a mobile application to be deployed with cordova and am very excited about the Kendo Mobile UI. I have been playing with it for a couple of days and have this burning issue: When I try to load external view from local file on my machine everything runs smoothly but I was thinking of loading URLs remotely from the web site and keep the main kendo UI within the mobile application. So I figured I would just load the appropriate on the local application from the remote domain. But when I try to load a view with the full domain path like that:
<a data-role="button" href="http://www.comain.com/mobile_url.html" style="background-color: green">Go to</a>
The browser freezes and the view is not loaded. Does that mean that I can only include local files? If yes, maybe I can load external content with Ajaxor somethng of the sort? Or maybe there is a better approach I am missing?

And a second question - is there a way to tell kendo if a regular <a href... anchor should point to a view, or to a standard html page?

Thanks!
Dil
Top achievements
Rank 1
 answered on 22 Oct 2013
2 answers
394 views
I would like to create a button that when clicked, programmatically shows a column that is previously hidden, and then groups by a specific column...  Psudo code might be...

1.) Button Click
2.) Show Column called "City"
3.) Group by "State".

Any pointers on how to do this?

Jason
Jason
Top achievements
Rank 1
 answered on 22 Oct 2013
1 answer
2.1K+ views
I would like to create a button that woudl allow the user to reset this grid.  Meaning that after they apply some sorting, grouping, paging etc... they can click on this button and it would return the grid to the state it was at when the page loaded... Similar to reloading the entire page, but just reloading the grid.

Thanks,
Jason
Kiril Nikolov
Telerik team
 answered on 22 Oct 2013
2 answers
158 views
Hi there,

I'm using Kendo UI Mobile for a mobile application for a client, but am struggling with the events. I have found that the page-show and before-show events are only called the first time a page is loaded. If I navigate to the same page once more these events aren't triggered a second time.

My html:
1.<div id="page_test" data-role="view" data-title="Test" data-before-show="beforeshow()" data-show="show()">
2.    <div class="view-content">
3.        Test!
4.    </div>
5.</div>
The javascript:
1.function beforeshow() {
2.    alert('beforeshow');
3.}
4. 
5.function show() {
6.    alert('show');
7.}
If this is the correct way the events should work, could someone offer any other ideas on events that trigger at for each page view?

Aidan Langelaan
Aidan
Top achievements
Rank 1
 answered on 22 Oct 2013
1 answer
149 views
How do I download the current version of Kendo UI Mobile for Icenium (v2013.2.729 I believe).
I'm after the full package as I only wish to include the kendo.mobile.flat.min.css file (not the all.min.css one) in my project.

I can download the latest v2013.2.918 via the trial download but I don't think Icenium  supports it yet.

Thanks 
Darren
Steve
Telerik team
 answered on 22 Oct 2013
1 answer
123 views
Hello! I have a question......

It´s Url explains how can i change appearence for elements in a form....
http://demos.kendoui.com/mobile/forms/appearance.html#/

but wich is the style for display dropdownlist in all space of the list view like a input or label?

for label:

.km-root .appearance .km-listview label
{
width: 100%;
}

for input:

.km-root .km-pane .km-view.appearance .km-listview input
{
position: relative;
width: 100%;
right: 0;
margin-top: 0;
top: 0;
}


for dropdownlist??????????????




thank you very much

i hope your answer

Kiril Nikolov
Telerik team
 answered on 22 Oct 2013
1 answer
142 views
Hi guys,

i'm doing some tests, to do that i took a template on the kendo ui' page.
i clean it a bit to get what i want and right now, i have two div header in my html page.
i remove one at the load of the page and when i click on a button, i just want to remove the current header et set another one instead.
i've tried plenty of things but nothing seems to work correctly using jquery

here is my code:

<!DOCTYPE html>
<html>
<head>
    <title>Demo</title>
    <link href="styles/kendo.common.min.css" rel="stylesheet" />
    <link href="styles/kendo.default.min.css" rel="stylesheet" />
    <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" />
    <link href="styles/index.css" rel="stylesheet" />
    <script src="js/jquery.min.js"></script>
    <script src="js/kendo.all.min.js"></script>
</head>
 
<!--
    Contenu des pages chargées par le paneau left
-->
 
<body>
    <div data-role="view" id="drawer-home" data-layout="drawer-layout" data-title="Inbox">
    </div>
 
    <div data-role="view" id="drawer-starred" data-layout="drawer-layout" data-title="Starred Items">
    </div>
 
    <div data-role="view" id="drawer-drafts" data-layout="drawer-layout" data-title="Drafts">
    </div>
 
<!--
    // Paneau Left
-->
 
<div data-role="drawer" id="my-drawer" style="width: 270px" data-views="['/', 'drawer-home', 'drawer-starred', 'drawer-drafts']">
    <ul data-role="listview" data-type="group">
        <li>Menu
            <ul>
                <li><a href="#drawer-home" data-transition="none">m1</a></li>
                <li><a href="#drawer-starred" data-transition="none">m2</a></li>
                <li><a href="#drawer-drafts" data-transition="none">m3</a></li>
            </ul>
        </li>
    </ul>
</div>
 
<!--
        Headers
-->
 
<div class="Head" data-role="layout" data-id="drawer-layout">
    <header data-role="header">
        <div class="" data-role="navbar">
            <a data-role="button" data-rel="drawer" href="#my-drawer" data-icon="drawer-button" data-align="left"></a>
            <span id="compagnyName">Demo</span>
            <a data-role="button" onClick="changeHead()" data-icon="drawer-button" data-align="right"></a>
        </div>
    </header>
</div>
 
<div class="HeadSearching" data-role="layout" data-id="drawer-layout">
    <header data-role="header">
        <div data-role="navbar">
            <a data-role="button" data-rel="drawer" href="#my-drawer" data-icon="drawer-button" data-align="left"></a>
            <input type="text" id="city" name="city" class="k-textbox" placeholder="Ville" data-align="center" />
            <select name="country" id="country" data-align="right">
                <option>France</option>
                <option>Angleterre</option>
                <option>Luxembourg</option>
                <option>Espagne</option>
            </select>
        </div>
    </header>
</div>
 
<script>
    var app = new kendo.mobile.Application(document.body);
    $('.HeadSearching').remove();
</script>
 
<script>
    function changeHead()
    {
        alert('header replace');
        $('.head').replaceWith('.HeadSearching');
    }
</script>
</body>
</html>
if someone could help me doing this correctly ..
thanks by advance ;)
Kiril Nikolov
Telerik team
 answered on 22 Oct 2013
1 answer
79 views
is there a way to reset an app so that it starts over and reloads all of the views, etc.?
Petyo
Telerik team
 answered on 22 Oct 2013
3 answers
207 views
hi guys.
i am using icenium and kendo mobile&web.
i am trying to create datepicker widget  in some of the views. after define data-model to the view and follow kendo demos , i managed to create dropdown list that bind to the data model. when try to create datepicker or timepicker it act like its ignore the code.
i use the data-role='timepicker' attribute same as in the demos.
is it possible that kendo mobile does not support mvvm and datetime pickers?
can you suggest me widget that can work to me?
regards
 maor
Maor
Top achievements
Rank 1
 answered on 22 Oct 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?