Telerik Forums
Kendo UI for jQuery Forum
0 answers
48 views

Hi 

I need create one measure for total sales amount Proportion by product category. For Example:

column                                    measure

Productcate ,  Productname  salesamount   amount%

A, A1               100,       58%

A, A2                50       29%

A, A3                 20    11%

A subtotal       170    73%

B, B1                 50    83%

B, B2                  10  17%

b subtotal       60    27%

Total               230  100%

 

How to design this code function?

Thanks.

James

 

james
Top achievements
Rank 1
 asked on 14 Sep 2023
1 answer
95 views

I've never really paid attention to this but got curious when trying to debug something.

What's the difference between cdn.kendostatic.com and kendo.cdn.telerik.com?

In some Telerik documentation there are references to kendo.cdn.telerik.com.  When I created a Telerik app in VS 2022, most references use cdn.kendostatic.com.

Should one be used over the other?

Georgi Denchev
Telerik team
 answered on 18 Apr 2023
0 answers
55 views

Hi,

How can I apply xmla data from asp.net core api to kendo pivotgrid using jquery.

So I created an endpoint that returns xmla data. just having a problem binding the data to the pivotgrid.

Enrico
Top achievements
Rank 1
 asked on 12 Apr 2023
1 answer
120 views

Hi there,

Legacy PivotGrid does not support special characters in the column field headers (and possibly elsewhere), e.g. '&'. Is there a recommended escaping strategy - for example if I have a 'you & me' string, how do I transform it? and should I do it before datasource-ing the Pivot or in a header template?

(Looks like PivotGrid V2 does support this out of the box)

Thanks,
Georgi

Neli
Telerik team
 answered on 21 Dec 2022
1 answer
265 views

I am attempting to locally run in my environment the code from the following demo:

https://demos.telerik.com/kendo-ui/pivotgrid/local-flat-data-binding

If I use the code functionally as-is it works fine. If however I change to an older version I receive the following error:

Uncaught TypeError: e.aggregate is not a function

My application is using version 2014.2.1008 which does provide the Pivot Grid even as it is a very old version. Is this a known issue resolved in a later version? Or perhaps I am just doing something wrong. Below is my code:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
    <title>Pivot Grid Demo</title>
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2014.2.1008/styles/kendo.common.min.css" />
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2014.2.1008/styles/kendo.default.min.css" />
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2014.2.1008/styles/kendo.default.mobile.min.css" />
    <script src="http://kendo.cdn.telerik.com/2014.2.1008/js/jquery.min.js"></script>
    <script src="http://kendo.cdn.telerik.com/2014.2.1008/js/kendo.all.min.js"></script>
    <style>
        #configurator {
            width: 400px;
            min-width: 400px;
            display: inline-block;
            vertical-align: top;
        }

        #pivotgrid {
            width: 67%;
            display: inline-block;
            vertical-align: top;
        }
    </style>
</head>
<body>
    <script src="https://demos.telerik.com/kendo-ui/content/shared/js/products.js"></script>
	<div id="example">
	    <div class="hidden-on-narrow" id="configurator"></div>
	    <div class="hidden-on-narrow" id="pivotgrid"></div>
	
	    <div class="responsive-message"></div>
	
	    <script>
	        $(document).ready(function () {
	            var pivotgrid = $("#pivotgrid").kendoPivotGrid({
	                filterable: true,
	                sortable: true,
	                columnWidth: 120,
	                height: 570,
	                dataSource: {
	                    data: products,
	                    schema: {
	                        model: {
	                            fields: {
	                                ProductName: { type: "string" },
	                                UnitPrice: { type: "number" },
	                                UnitsInStock: { type: "number" },
	                                Discontinued: { type: "boolean" },
	                                CategoryName: { field: "Category.CategoryName" }
	                            }
	                        },
	                        cube: {
	                            dimensions: {
	                                ProductName: { caption: "All Products" },
	                                CategoryName: { caption: "All Categories" },
	                                Discontinued: { caption: "Discontinued" }
	                            },
	                            measures: {
	                                "Sum": { field: "UnitPrice", format: "{0:c}", aggregate: "sum" },
	                                "Average": { field: "UnitPrice", format: "{0:c}", aggregate: "average" }
	                            }
	                        }
	                    },
	                    columns: [{ name: "CategoryName", expand: true }, { name: "ProductName" } ],
	                    rows: [{ name: "Discontinued", expand: true }],
	                    measures: ["Sum"]
	                }
	            }).data("kendoPivotGrid");
	
	            $("#configurator").kendoPivotConfigurator({
	                dataSource: pivotgrid.dataSource,
	                filterable: true,
	                sortable:true,
	                height: 570
	            });
	        });
	    </script>
	</div>
</body>
</html>


 

Georgi Denchev
Telerik team
 answered on 13 Oct 2021
1 answer
166 views

I am currently working with the Pivot Grid; its quite nice. I have noticed though that if the Column is removed, the grid itself still retains data and formatting unique to that column. Using the demo as an example:
https://demos.telerik.com/jsp-ui/pivotgrid/index

The default columns are:

[Date].[Calendar] and [Product].[Category]

The default measure is:

[Measures].[Reseller Freight Cost]

If you remove all three of the above, both column fields and the measure, the resulting PivotGrid will still reflect a financial amount even though only a Row is populated with a Field.

See screen shot:

This is confusing to me and my users; why is it working this way? Is it possible to change this behavior?

Nikolay
Telerik team
 answered on 20 Sep 2021
1 answer
428 views
I'm struggling to get a Pivot Grid to populate. The demo works fine locally; however the datasource for it is XML from the datacube/dll. I have been using other widgets successfully with data delivered as JSON; is it possible to use JSON for the Pivot Grid? Are there any examples of this or even other examples of a Pivot Grid aside from the demo? Thanks in advance. 
Georgi Denchev
Telerik team
 answered on 02 Sep 2021
1 answer
65 views
Hi, I'm currently on trial and exploring the Kendo Pivot Grid feature.

I'm wondering is it possible to trigger interaction of the pivot grid element from externally element.
For example a button that when click, will expand this particular column members.

Angel Petrov
Telerik team
 answered on 25 Nov 2020
3 answers
135 views

Hi,

I am using the latest version of Kendo UI i.e. 2017.3.921. I am trying to include in my solution the kendo-pivot but it seems that some of the features are not working:

1. The configuration option sortable enables the "Sort Ascending / Descending" options in the pivot grid BUT when clicked they do nothing. I tried in local binding demo and added the sortable: true just below the filterable property, and it does not work. I tied the same in the documentation of the sortable configuration setting but the dojo example does nothing

2. I have a kendo-pivot bound to a datasource with remote data of json type. I perform a read operation, the kendo pivot as well as the kendo configurator is populated with data. The pivot has only one Row dimension and no column fields (one measure, only). Should I expand the Row dimension to all its values and force a requery i.e. datasource.read() again the read function of the transport definition is execute OK BUT the statement options.sucess fails with the exception "cannot read property value of undefined"

 

function preparePivotDS(espqParams, esOptions) {
                var qParams = angular.isFunction(espqParams) ? espqParams() : espqParams;
 
                var xParam = {
                    transport: {
                        requestEnd: function(e) {
                            var response = e.response;
                            var type = e.type;
                            console.log(type); // displays "read"
                            console.log(response.length); // displays "77"
                        },
 
                        read: function(options) {
 
                            var pqOptions = {};
 
                            var executeParams = qParams.Params;
                            if (executeParams instanceof esGlobals.ESParamValues) {
                                if (!executeParams.isValidState()) {
                                    var err = new Error($translate.instant("ESUI.PQ.PARAMS_MISSING"));
                                    options.error(err);
                                    throw err;
 
                                }
                                executeParams = executeParams.getExecuteVals();
                            }
 
                            esWebApiService.fetchPublicQuery(qParams.GroupID, qParams.FilterID, pqOptions, executeParams)
                                .then(function(pq) {
                                    pq = pq.data;
                                    options.success(pq.Rows || []);
                                })
                                .catch(function(err) {
                                    $log.error("Error in DataSource ", err);
                                    options.error(err);
                                });
                        },
 
                    }
                };
 
                if (esOptions) {
                    angular.extend(xParam, esOptions);
                }
 
                return new kendo.data.PivotDataSource(xParam);
            }
Alex Hajigeorgieva
Telerik team
 answered on 18 Nov 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?