kendo bar chart ordering issue -


i have kendo barchart , data model , bind char. problem here unable sort order. pasting code below. todat certification time coming in between.any on highly appreciated.

var certdata = [{"ironcount":1.65,"typewisedata":"adapter","testtype":"magnetic particle test"},{"ironcount":2.76,"typewisedata":"adapter","testtype":"ut thickness test"},{"ironcount":140.37,"typewisedata":"adapter","testtype":"totalcertificationtime"},{"ironcount":2.02,"typewisedata":"swivel","testtype":"ut thickness test"},{"ironcount":2.06,"typewisedata":"swivel","testtype":"magnetic particle test"},{"ironcount":142.67,"typewisedata":"swivel","testtype":"totalcertificationtime"}];   var dscertpdata = new kendo.data.datasource({         data: certdata,         group: {             field: "testtype",             //dir: "asc"         },         sort:{                    field :"ironcount",             dir:"asc"     }     });      $("#chart1").kendochart({         title: {             text: "certification time per piece report",             font: "bold 20px arial,helvetica,sans-serif",             color: "brown"         },         //plotarea: {         //    background: "#f8f3f3"         //},         datasource: dscertpdata,         series: [{             type: "column",             categoryfield: "typewisedata",             field:"ironcount"         }],          valueaxis: {             title: {                 text: "utilization",                 font: "bold 15px arial,helvetica,sans-serif",                 color: "brown"             }         },          categoryaxis:{             title: {                 text: "iron types",                 font: "bold 18px arial,helvetica,sans-serif",                 color: "brown"             }         },          tooltip: {             visible: true,             template: "${series.name} : ${value}"         }     }); 

you swap grouping:

var dscertpdata = new kendo.data.datasource({     data: certdata,     group: {       field: "typewisedata",     },     sort:{              field :"ironcount",       dir:"desc"     } });   series: [{     type: "column",     categoryfield: "testtype",     field:"ironcount" }],  

demo


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -