JSFiddle - React, Tailwind, and code Playground
HTML
<div class="demo-info" style="margin-bottom:10px">
<div class="demo-tip icon-tip"> </div>
<div>Pivot Grid - Column Order Issue</div>
</div>
<table id="pg" style="width:500px;height:300px"></table>
CSS
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css"> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/demo/demo.css"> <script type="text/javascript" src="https://code.jquery.com/jquery.min.js"></script> <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
JavaScript
var data = [{
"ProjectName": "Company Holiday",
"OrderNumber": "123",
"Hrs": 8,
"ResourceName": "Gilly",
"ForecastMonth": "Dec-16"
}, {
"ProjectName": "Company Holiday",
"OrderNumber": "123",
"Hrs": 8,
"ResourceName": "Gilly",
"ForecastMonth": "Jul-16"
}];
$(function() {
$('#pg').pivotgrid({
pivot: {
rows: ['ProjectName', 'ResourceName'],
columns: ['ForecastMonth'],
values: [{
field: 'Hrs',
op: 'sum'
}],
filters: ['ProjectName', 'ResourceName', 'ForecastMonth']
},
forzenColumnTitle: '<span style="font-weight:bold">Resource Name</span>',
valuePrecision: 0,
data: data
});
});