Telerik Forums
Kendo UI for jQuery Forum
0 answers
54 views
Please forgive if this is a double post.  I posed this question in the original thread in the "Preview Forum Thread" which is no longer accessible in the forum listing.  So I thought I'd repost in an active forum.

I've been trying to display aggregate values in my charts.  Both a pie chart and a bar chart.  The basic idea is that I grab one table of data and then aggregate it into different displays.  Via searching I've found an example for doing this in a pie chart.  Basically we need to build our own series rather than being able to bind to the aggregate sum.

here's the post
http://www.kendoui.com/forums/dataviz/general-discussions/aggregate-pie-chart.aspx#2066234 
here's the related jsfiddle
http://jsfiddle.net/valchev/VzWdk/ 

I've managed to get it also working for bar charts as well

http://jsfiddle.net/yf9cF/ 

Any plans on making this feature available where we can bind to aggregate values when we group data?

Regards,

Chris 
Chris
Top achievements
Rank 1
 asked on 30 May 2012
1 answer
299 views
Please forgive if this is a double post.  I posed this question in the original thread in the "Preview Forum Thread" which is no longer accessible in the forum listing.  So I thought I'd repost in an active forum.

I've been trying to display aggregate values in my charts.  Both a pie chart and a bar chart.  The basic idea is that I grab one table of data and then aggregate it into different displays.  Via searching I've found an example for doing this in a pie chart.  Basically we need to build our own series rather than being able to bind to the aggregate sum.

here's the post
http://www.kendoui.com/forums/dataviz/general-discussions/aggregate-pie-chart.aspx#2066234 
here's the related jsfiddle
http://jsfiddle.net/valchev/VzWdk/ 

I've managed to get it also working for bar charts as well

http://jsfiddle.net/yf9cF/ 

Any plans on making this feature available where we can bind to aggregate values when we group data?

Regards,

Chris

Chris
Top achievements
Rank 1
 answered on 30 May 2012
11 answers
494 views
Is it possible make a pie chart  
with aggregate count.


For example:

var Data = [

        { "Name": "Marks S.", "FavoriteColor": “Red”},

       { "Name": "Hanna M.", "FavoriteColor ": “Blue” },

       { "Name": "Brad A.", "FavoriteColor ": “Blue” }

];

categoryField : FavoriteColor

field: count  (aggregate)




<div id="example" class="k-content"><br>       
<
div class="chart-wrapper">
 <div id="chart">           
</
div>
</div>

     
  <script>
var Data = [{ "Name": "Marks S.", "FavoriteColor": "Red"},
 {
"Name": "Hanna M.", "FavoriteColor": "Blue"}, { "Name": "Brad A.", "FavoriteColor": "Blue"}];

function
createChart() {
 $(
"#chart").kendoChart({
 theme: $(document).data(
"kendoSkin") || "default",
title: {text:
"Aggregate Example"},
legend: {position:
"bottom"},
dataSource: {data: Data,
             aggregate: [{ field:
"FavoriteColor", aggregate: "count"}],
             group: { field:
"FavoriteColor" }
    },
series: [{ type:
"pie",
field:
"#= count#",
categoryField:
"FavoriteColor"}],
tooltip: {visible:
true,
template:
"${ category } - #= value#"}});
}


 $(document).ready(
function () {
setTimeout(
function () {                  
  
createChart();
$(
"#example").bind("kendo:skinChange", function (e) {
createChart();
}); }, 100);
});
</script>
</div>


Regards,
Have a Nice day
Chris
Top achievements
Rank 1
 answered on 30 May 2012
4 answers
243 views
I'm trying to get a custom editor (DropDownList) to work, but am not having any luck. I have the following setup:

Grid:
DataSource: a remote GET request that works fine
In the grid's datasource, I have a field called ProjectId that is set to editable and of type "number"

The grid displays all of the data just fine. When I click on a cell to switch it into edit mode, I'm showing a drop down that remotely gets a list of projects to display, based on the value of the ClientId field for that row. The code is below:

var projectsDataSource = new kendo.data.DataSource({
  transport: {
    read: {
      url: "/ProjectsDataUrl";
      dataType: "json"
    }
  }
})
 
function projectsEditor(container, options) {
  if (options.model.ClientId !== null) {
    projectsDataSource.transport.options.read.data = {
      clientId: options.model.ClientId
    };
     projectsDataSource.read();
    return ($("<input name='ProjectId' data-bind='value:" + options.field + "' />")).appendTo(container).kendoDropDownList({
      dataSource: projectsDataSource,
      autoBind: false,
      dataTextField: "Name",
      dataValueField: "Id",
      optionLabel: "Select Project"
    }).data("kendoDropDownList");
  }
};

I'm only showing the editor if the ClientId field is not null. The drop down list displays fine, but after making my selection and clicking away, the underlying data does not get updated. I'm really not sure what I'm doing wrong here.
Jaben
Top achievements
Rank 1
 answered on 30 May 2012
0 answers
86 views
I noticed that some Telerik Q2 Webinars were coming up on new features etc of several of the product lines including the web AJAX/MVC packages....but doesn't look like there's anything for Kendo UI.  Is there a plan for a Q2 webinar for Kendo?

Thanks,
Eric
Eric
Top achievements
Rank 1
 asked on 30 May 2012
1 answer
102 views
I am trying to reverse the valuesAxis from 0 to 40 upside down but it doesn't work
This is my js source:

valueAxis: {
            reverse: true,
            max:40,
            min:0,          
            labels: {
                format: "{0}"
            }
        }

Iliana Dyankova
Telerik team
 answered on 30 May 2012
3 answers
201 views
I have a view model with an array in it and don't seem to be able to use third party libraries such as Sugar to extend the functionality of the arrays. I've set up an example at http://jsfiddle.net/BrianVallelunga/rmgak/ 

It seems as though Kendo transforms the view model's fields into something completely different. Is there any way to still utilize libraries like Sugar in this situation?

If not, what type are the arrays transformed into, and what methods are available on them?

Thanks
Atanas Korchev
Telerik team
 answered on 30 May 2012
1 answer
89 views
I'm trying to figure out how to have a template in a Kendo grid display the meridiem. I have the following column:

{ title: 'Start Date', field: 'startDate', template: "#= kendo.toString(convertToLocalTime(startDate), 'MMMM dd yyyy, h:mm a') #" },

But it ends up displaying 'May 1 2012, 6:00 a' instead of AM or PM. What do I need to use in the format to display this? Is there a doc anywhere showing the formats?
Kyle
Top achievements
Rank 1
 answered on 30 May 2012
0 answers
89 views
Hi,

Is there any possibility to have list view within another list view with edit functionality for each list view.

Thanks and regards,
Durga Bhavani Gubbala.
durga bhavani
Top achievements
Rank 1
 asked on 30 May 2012
1 answer
149 views
I'm trying to use my own CSS class to style an element in a grid cell, but Kendo's styles are overriding my class and not allowing my style. How do I use my own style in a grid cell?
Iliana Dyankova
Telerik team
 answered on 30 May 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?