-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathSurveyAnalyticsDatatables.js
27 lines (26 loc) · 1.08 KB
/
SurveyAnalyticsDatatables.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Component } from "react";
import { data, json } from "../data/analytics_data";
import { DataTables } from "survey-analytics/survey.analytics.datatables.js";
import { Model } from "survey-core";
import $ from "jquery";
import "datatables.net/js/jquery.dataTables.js";
import "datatables.net-dt/js/dataTables.dataTables.js";
import "datatables.net-buttons/js/dataTables.buttons.js";
import "datatables.net-buttons/js/buttons.print.js";
import "datatables.net-buttons/js/buttons.html5.js";
import "datatables.net-colreorder/js/dataTables.colReorder.js";
import "datatables.net-rowgroup/js/dataTables.rowGroup.js";
import "datatables.net-colreorder-dt/css/colReorder.dataTables.css";
import "survey-analytics/survey.analytics.datatables.css";
export default class SurveyAnalyticsDatatables extends Component {
visPanel;
componentDidMount() {
DataTables.initJQuery($);
const survey = new Model(json);
this.visPanel = new DataTables(survey, data);
this.visPanel.render(document.getElementById("summaryContainer"));
}
render() {
return <div id="summaryContainer"></div>;
}
}