Skip to content

Latest commit

 

History

History
109 lines (83 loc) · 2.19 KB

QdtTable.md

File metadata and controls

109 lines (83 loc) · 2.19 KB

QdtTable: Create an Interactive Table

QdtTable

  • Create an interactive, sortable table.

Properties

prop type description
cols Array [dimension, measure]
height Number 400
rowHeight Number 40

Code

Vanilla JavaScript

var options = {
  config: { /* host, port, appid, etc. */ },
  connections: { /* vizApi, engineAPI */}
}

var qdtComponents = new QdtComponents(options.config, options.connections);

var element = document.getElementById('qdt1');

qdtComponents.render(
  "QdtTable", 
  {
    cols: [
      'Case Owner',
      'Employee Status',
      "=Count( {$<Status -={'Closed'} >} Distinct %CaseId )",
    ],
    height: 400,
    rowHeight: 40,
  }, 
  element
);

React

<QdtComponent
  type='QdtTable'
  props={{
    cols: [
      'Case Owner',
      'Employee Status',
      "=Count( {$<Status -={'Closed'} >} Distinct %CaseId )",
    ],
    height: 400,
    rowHeight: 40,
  }}
/>

Angular

// qdt-table.component.ts
import { Component, OnInit, ElementRef } from '@angular/core';

@Component({
  selector: 'qdt-table',
  templateUrl: './qdt-table.component.html',
})
export class QdtTableComponent implements OnInit {

  constructor(private el: ElementRef) { }

  chart_options = {
    type: 'QdtTable',
    props: {
      cols: [
        'Case Owner',
        'Employee Status',
        "=Count( {$<Status -={'Closed'} >} Distinct %CaseId )",
      ],
      height: 400,
      rowHeight: 40,
    },
  };

  ngOnInit() {

  }

}
<!-- html -->
<qdt-table [Component]="chart_options.type" [props]="chart_options.props"></qdt-table>

Examples


← Back to All Components