Telerik Forums
Kendo UI for jQuery Forum
0 answers
45 views

So I have data in this format 

{

name: health

data:[[1,2],[2,2],[3,4]]

type:"area"

visible:true

},

{

name: health2

data:[[1,2],[2,2],[3,4]]

type:"line"

visible:true

}
I have attached a screenshot of what i want to achieve need guidance to do this I'm new to kendo .

Hrushi
Top achievements
Rank 1
 asked on 28 Oct 2023
0 answers
37 views

i have controller using java as @RequestMapping("/charts") and it return in Json format but my question this data is not reflected in my Grid why. 

 $("#grid").kendoGrid({
                        dataSource: {
                           
                    transport: {
                         read: {
                             url: function(options) 
                             {   return "${pageContext.request.contextPath}/charts";
                                         },
                            
                            dataType: "json",
                            type: "GET"
                        }
                        },
                            
                            schema:{
                                model: {
                                    fields: {
                                        id: { type: "number" },
                                        fullName : { type: "string" },
                                        address: { type: "string" },
                                        email : { type: "string" },
                                        password: { type: "string" },
                                        designation: { type: "string" },
                                        salary: { type: "number" }
                                    }
                                }
                            },

                            aggregate: [ { field: "fullName", aggregate: "count" },
                                
                                          { field: "salary", aggregate: "sum" }
                                          ]
                             
                       ,pageSize: 8 },
                        sortable: true,
                        scrollable: false,
                       pageSize: 5,
                       pageSizes: true,
                        hieght:20,
                         pageable: {
                
           pageSizes: [4, 6,10,"all"],
           buttonCount: 5
                },
     columns: [
                   { field: "id", title: "ID", width: 180  },
                   { field: "fullName", title: "Name",width:300,
                    template: "<div style=color:red>#=fullName#</div>" ,footerTemplate: "Total Count: #=count#"  },
                     { field: "address", title: "Address",width:300 },
                      { field: "email", title: "Email",width:200},
                      { field: "password", title: "Password" ,width:200},
                            { field: "designation", title: "Designation" ,width:300},
                            { field: "salary", title: "Salary" ,width:200,footerTemplate: "Total Sum: #=sum#"},
                            { width:200,
                              template: "<a class='k-button' href='/Home/Index'>Redirect</a>"   }
                            
                        ]
                    });

kha
Top achievements
Rank 1
Iron
Iron
 asked on 22 Oct 2023
0 answers
73 views

 

Hi, I want to create a bullet chart in the form of group data and set a unique target data, color, tooltip-template for each bar like "column chart" in picture but I can't find how to bind data for bullet chart 

Is there a way to make the chart look like the example? Please advise if there is a more suitable graph format to display this type of data.

 

  var testData3 = [
        { name: "data 1", data: [[200, 350], [150, 170]], color: "#E56997", target: { color: "#E56997" }, tooltip: { template: "#= dataItem #" } },
        { name: "data 2", data: [[210, 250], [190, 300]], color: "#062cda", target: { color: "#062cda" }, tooltip: { template: "#= dataItem.name #" } },
        { name: "data 3", data: [[350, 200], [200, 200]], color: "#fd0166", target: { color: "#fd0166" }, tooltip: { template: "#= value #" } },
        { name: "data 4", data: [[450, 200], [270, 400]], color: "#9F00FF", target: { color: "#9F00FF" }, tooltip: { template: "#= value #" } },
    ]

    $("#testChart").kendoChart({
        title: {
            text: "Bullet",
            font: fontSize
        },
        legend: { visible: false },
        dataSource: {
            data: testData3,
        },
        seriesDefaults: {
            type: "verticalBullet",
            overlay: { gradient: "none" },
            labels: {
                visible: true,
                background: "transparent",
                color: "white"
            },
            tooltip: {
                visible: true,
            }
        },
        series: testData3,
        categoryAxis: {
            categories: ["Jul", "Aug", "Sep"]
        }
    });
Pheeraphong
Top achievements
Rank 1
 updated question on 21 Sep 2022
1 answer
52 views

I want the chart in this dojo example to be in descending order.   Currently it is in ascending order.  I used the sort on the datasource but it doesn't seem to be reflecting in the chart.   I'm sure i am missing something simple here but any help would be appreciated. 

https://dojo.telerik.com/UNENAfos

Thanks.  

Georgi Denchev
Telerik team
 answered on 13 Sep 2022
1 answer
136 views

Hey there, 

 

I am using Data query APIs to groupBy my data by priorities:

  this.piechartData = groupBy(chartData, [{field:"priority"}]);

Then I want to count the items per priority value to build the piechart. However, the aggregate="count" is not working for me. 

 

Is there

<kendo-chart>
                <kendo-chart-series>
                  <kendo-chart-series-item
                    type="donut"
                    *ngFor="let item of piechartData"
                    [data]="item.items"
                    [name]="item.value"
                    categoryField="priority"
                    aggregate="count"
                    field="taskName">
                  </kendo-chart-series-item>
                </kendo-chart-series>
                <kendo-chart-legend [visible]="false"></kendo-chart-legend>
            </kendo-chart>

a way around to do this?

I used this approach for barcharts and linecharts before and it worked.

 

Regards,

Nazareth

Martin
Telerik team
 answered on 27 Aug 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?