Html Grid

Set the filterable property of the jqxGrid. Author: http://jqwidgets.com

by txhi

HTML

<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="https://jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/generatedata.js"></script>
<div id='chartContainer' style="width: 950px; height: 500px"></div>

JavaScript

var data2 = [
  { Person: "Planning", M1_From: 11, M1_To: 14, M2_From: 15, M2_To: 51 },
  { Person: "Dev 1", M1_From: 11, M1_To: 19, M2_From: 51, M2_To: 55 },
  //{ Person: "Dev 2", M1_From: "10-16-2017", M1_To: "10-21-2017", M2_From: "11-22-2017", M2_To: "12-23-2017" },
  //{ Person: "QA 1", M1_From: "10-10-2017", M1_To: "11-01-2017", M2_From: "11-02-2017", M2_To: "12-10-2017" }
];

// prepare jqxChart settings
var settings = {
  title: "Monthly Project Schedule",
  description: "Website update plan",
  enableAnimations: true,
  showLegend: true,
  padding: { left: 5, top: 5, right: 10, bottom: 5 },
  titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },
  source: data2,
  xAxis:
  {
    dataField: 'Person',
    unitInterval: 1,
    tickMarks: {
      visible: true,
      interval: 1,
      color: '#BCBCBC'
    }
  },
  colorScheme: 'scheme05',
  seriesGroups:
  [
    {
      orientation: 'horizontal',
      type: 'rangecolumn',
      columnsGapPercent: 100,
      valueAxis:
      {
        flip: true,
        minValue: 1,
        maxValue: 61,

        showTickMarks: true,
        tickMarksInterval: 1,
        unitInterval: 1,
        title: { text: 'date' },
        tickMarks: { color: '#BCBCBC' },
        labels: { angle: 90 },
        formatFunction: function (value) {
          var firstMonthDays = 31;
          var currentDate = value > firstMonthDays ? (value - firstMonthDays) + "-11" : value + "-10";

          return currentDate + '-2017';
        }
      },
      series: [
        { dataFieldFrom: 'M1_From', dataFieldTo: 'M1_To', displayText: 'M1 Field', opacity: 1 },
        { dataFieldFrom: 'M2_From', dataFieldTo: 'M2_To', displayText: 'M2 Field', opacity: 1 }
      ]
    }
  ]
};
// setup the chart
$('#chartContainer').jqxChart(settings);