www/jqwidgets/jqxgrid.chart.js

Sat, 25 Sep 2021 10:42:54 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 25 Sep 2021 10:42:54 +0200
changeset 778
e64fd38c469c
parent 733
67bf19c50fcc
permissions
-rw-r--r--

If during styles import the CATEGORY_NUMBER is empty, insert 0 in the database instead.

619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /* tslint:disable */
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 /* eslint-disable */
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 (function ($) {
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
4 if (!Array.prototype.find) {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
5 Object.defineProperty(Array.prototype, 'find', {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
6 value: function(predicate) {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
7 // 1. Let O be ? ToObject(this value).
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
8 if (this == null) {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
9 throw new TypeError('"this" is null or not defined');
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
10 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
11
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
12 var o = Object(this);
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
13
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
14 // 2. Let len be ? ToLength(? Get(O, "length")).
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
15 var len = o.length >>> 0;
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
16
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
17 // 3. If IsCallable(predicate) is false, throw a TypeError exception.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
18 if (typeof predicate !== 'function') {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
19 throw new TypeError('predicate must be a function');
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
20 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
21
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
22 // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
23 var thisArg = arguments[1];
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
24
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
25 // 5. Let k be 0.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
26 var k = 0;
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
27
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
28 // 6. Repeat, while k < len
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
29 while (k < len) {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
30 // a. Let Pk be ! ToString(k).
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
31 // b. Let kValue be ? Get(O, Pk).
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
32 // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
33 // d. If testResult is true, return kValue.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
34 var kValue = o[k];
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
35 if (predicate.call(thisArg, kValue, k, o)) {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
36 return kValue;
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
37 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
38 // e. Increase k by 1.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
39 k++;
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
40 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
41
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
42 // 7. Return undefined.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
43 return undefined;
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
44 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
45 });
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
46 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
47 if (!Array.prototype.findIndex) {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
48 Object.defineProperty(Array.prototype, 'findIndex', {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
49 value: function(predicate) {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
50 // 1. Let O be ? ToObject(this value).
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
51 if (this == null) {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
52 throw new TypeError('"this" is null or not defined');
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
53 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
54
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
55 var o = Object(this);
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
56
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
57 // 2. Let len be ? ToLength(? Get(O, "length")).
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
58 var len = o.length >>> 0;
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
59
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
60 // 3. If IsCallable(predicate) is false, throw a TypeError exception.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
61 if (typeof predicate !== 'function') {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
62 throw new TypeError('predicate must be a function');
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
63 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
64
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
65 // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
66 var thisArg = arguments[1];
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
67
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
68 // 5. Let k be 0.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
69 var k = 0;
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
70
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
71 // 6. Repeat, while k < len
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
72 while (k < len) {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
73 // a. Let Pk be ! ToString(k).
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
74 // b. Let kValue be ? Get(O, Pk).
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
75 // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
76 // d. If testResult is true, return k.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
77 var kValue = o[k];
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
78 if (predicate.call(thisArg, kValue, k, o)) {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
79 return k;
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
80 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
81 // e. Increase k by 1.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
82 k++;
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
83 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
84
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
85 // 7. Return -1.
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
86 return -1;
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
87 },
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
88 configurable: true,
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
89 writable: true
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
90 });
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
91 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
92
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
93 $.extend($.jqx._jqxGrid.prototype, {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
94 _getChartDataFields: function (data) {
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
95 var that = this;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
96 var record = data[0];
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
97 var stringOnly = true,
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
98 xAxisDataField,
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
99 series = [];
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
100
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
101 for (var dataField in record) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
102 if (dataField === '$' || dataField === 'uid' || dataField === 'boundindex' || dataField === 'uniqueid' || dataField === 'visibleindex') {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
103 continue;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
104 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
105
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
106 var dataType = that.source._source.dataFields.find(function (gridField) { return gridField.name === dataField }).type;
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
107
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
108 if (dataType === 'string') {
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
109 var index = that.columns.records.findIndex(function (col) { return col.datafield === dataField });
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
110
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
111 if (index === 0) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
112 xAxisDataField = dataField;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
113 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
114 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
115 else {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
116 stringOnly = false;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
117 series.push({ dataField: dataField, displayText: dataField });
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
118 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
119 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
120
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
121 return { xAxisDataField: xAxisDataField, series: series, stringOnly: stringOnly };
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
122 },
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
123
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
124 createChart: function (type, dataSource) {
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
125 var that = this;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
126 var gridSelection = that.getselection(),
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
127 selectedRows = gridSelection.rows,
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
128 selectedCells = gridSelection.cells,
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
129 chartElement = document.createElement('div'),
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
130 chartData = [],
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
131 seriesGroup = {};
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
132 var rowsToPlot = [],
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
133 columnsToPlot = [],
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
134 series;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
135
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
136 if (selectedCells && selectedCells.length > 1) {
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
137 selectedCells.forEach(function (cell) {
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
138 if (rowsToPlot.indexOf(cell.rowindex) === -1) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
139 rowsToPlot.push(cell.rowindex);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
140 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
141
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
142 if (columnsToPlot.indexOf(cell.datafield) === -1) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
143 columnsToPlot.push(cell.datafield);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
144 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
145 });
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
146 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
147
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
148 if (selectedRows.length === 0 && selectedCells.length === 0) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
149 var dataSource = that.source.records;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
150 }
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
151
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
152 if (dataSource) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
153 chartData = chartData.concat(dataSource);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
154 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
155 else {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
156 var dataSource = that.source.records;
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
157
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
158 for (var i = 0; i < dataSource.length; i++) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
159 var record = {};
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
160
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
161 if (selectedRows.length > 0) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
162 if (selectedRows.indexOf(i) === -1) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
163 continue;
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
164 }
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
165 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
166 else if (selectedCells.length > 0) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
167 if (selectedCells.length > 1) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
168 if (rowsToPlot.indexOf(i) === -1) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
169 continue;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
170 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
171
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
172 columnsToPlot.forEach(function (dataField) {
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
173 record[dataField] = dataSource[i][dataField];
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
174 });
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
175 chartData.push(record);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
176 continue;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
177 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
178 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
179
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
180 that.columns.records.forEach(function (col) { record[col.datafield] = dataSource[i][col.datafield] });
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
181 chartData.push(record);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
182 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
183 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
184
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
185 var chartDataFields = that._getChartDataFields(chartData);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
186
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
187 if (chartDataFields.stringOnly) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
188 if (that.showheader) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
189 var chartIcon = that.element.querySelector('#' + type);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
190
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
191 that.toolbar[0].firstElementChild.classList.add('warning');
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
192
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
193 if (chartIcon) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
194 chartIcon.classList.add('warning');
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
195 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
196
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
197 setTimeout(function () {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
198 that.toolbar[0].firstElementChild.classList.remove('warning');
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
199
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
200 if (chartIcon) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
201 chartIcon.classList.remove('warning');
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
202 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
203 }, 1000);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
204 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
205
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
206 return;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
207 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
208
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
209 series = chartDataFields.series;
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
210
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
211 var chart = {};
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
212
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
213 chart.title = '';
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
214 chart.description = '';
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
215 chart.showLegend = true;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
216 chart.showBorderLine = false;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
217 chart.padding = { left: 5, top: 10, right: 5, bottom: 5 };
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
218 chart.source = chartData;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
219 chart.xAxis =
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
220 {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
221 dataField: chartDataFields.xAxisDataField,
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
222 gridLines: {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
223 visible: true
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
224 }
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
225 };
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
226 chart.valueAxis =
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
227 {
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
228 displayValueAxis: true,
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
229 description: that.charting.description,
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
230 axisSize: 'auto',
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
231 formatSettings: that.charting.formatSettings
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
232 };
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
233 chart.colorScheme = that.charting.colorScheme;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
234 chart.seriesGroups = [seriesGroup];
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
235
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
236 seriesGroup.formatSettings = that.charting.formatSettings;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
237 seriesGroup.series = series;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
238
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
239 if (type === 'line') {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
240 series.forEach(function (serie) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
241 serie.symbolSize = 8;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
242 serie.symbolType = 'square';
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
243 });
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
244 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
245 else if (type === 'pie') {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
246 var pieDataField = series[0].dataField;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
247
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
248 delete seriesGroup.formatSettings;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
249 seriesGroup.formatFunction = function (value, index) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
250 if (isNaN(value)) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
251 if (typeof value === 'object') {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
252 return index;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
253 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
254
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
255 return value;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
256 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
257
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
258 return value;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
259 };
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
260 seriesGroup.showLabels = true;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
261 series.length = 0;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
262 series.push({
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
263 dataField: pieDataField,
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
264 displayText: chartDataFields.xAxisDataField,
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
265 initialAngle: 0
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
266 });
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
267 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
268 else if (type === 'bar') {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
269 type = 'column';
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
270 seriesGroup.orientation = 'horizontal';
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
271 chart.xAxis.textRotationAngle = 90;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
272 chart.valueAxis.textRotationAngle = 30;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
273 chart.valueAxis.flip = true;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
274 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
275 else if (type === 'area') {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
276 var opacity = 1;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
277
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
278 for (var i = 0; i < series.length; i++) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
279 series[i].opacity = opacity;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
280 opacity -= 0.2;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
281 opacity = Math.max(0.3, opacity);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
282 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
283 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
284
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
285 seriesGroup.type = type;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
286
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
287 if (that.charting.ready) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
288 that.charting.ready(chart);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
289 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
290
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
291 if (that.charting.appendTo) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
292 var container = that.charting.appendTo === 'string' ? document.querySelector(that.charting.appendTo) : that.charting.appendTo;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
293
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
294 if (container) {
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
295 var chartInstance = new jqxChart(chartElement, chart);
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
296 container.appendChild(chartElement);
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
297 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
298 }
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
299 else {
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
300 that._openChartDialog(chartElement, type, chart);
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
301 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
302 },
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
303
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
304 _openChartDialog: function (chart, chartType, settings) {
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
305 var that = this;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
306
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
307 if (!that.charting.dialog.enabled) {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
308 return false;
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
309 }
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
310
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
311 var dialogElement = document.createElement('div');
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
312
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
313 dialogElement.innerHTML = '<div>' + that.charting.dialog.header + '</div><div style="overflow:hidden;"></div>';
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
314
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
315 var chartLabel = chartType.substring(0, 1).toUpperCase() + chartType.substring(1);
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
316
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
317 chart.style.width = '100%';
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
318 chart.style.height = '100%';
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
319
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
320 var dialog = new jqxWindow(dialogElement, {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
321 width: that.charting.dialog.width,
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
322 height: that.charting.dialog.height,
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
323 position: that.charting.dialog.position,
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
324 isModal: true
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
325 });
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
326
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
327 dialog.open();
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
328
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
329 setTimeout(function () {
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
330 dialogElement.querySelector('.jqx-widget-content').appendChild(chart);
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
331 var chartInstance = new jqxChart(chart, settings);
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
332 }, 100);
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
333
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
334 dialog.on('close', function () {
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
335 dialog.destroy();
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
336 });
733
67bf19c50fcc Upgraded jqwidgets from 9.0.0 to 12.0.1
Michiel Broek <mbroek@mbse.eu>
parents: 619
diff changeset
337 }
619
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
338 });
4938909df593 Fixed starter production date tooltip. Upgraded jqwidgets from version 8.1.4 to 9.0.0
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
339 })(jqxBaseFramework);

mercurial