evui 3.4.206 → 3.4.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -33
- package/dist/404.html +44 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.js +22645 -0
- package/dist/index.umd.cjs +28 -0
- package/dist/style.css +1 -0
- package/package.json +46 -43
- package/dist/evui.common.js +0 -63678
- package/dist/evui.common.js.map +0 -1
- package/dist/evui.umd.js +0 -63688
- package/dist/evui.umd.js.map +0 -1
- package/dist/evui.umd.min.js +0 -2
- package/dist/evui.umd.min.js.map +0 -1
- package/dist/img/EVUI.b82ee81a.svg +0 -293
- package/src/assets/logo.png +0 -0
- package/src/common/emitter.js +0 -20
- package/src/common/utils.bignumber.js +0 -67
- package/src/common/utils.debounce.js +0 -223
- package/src/common/utils.js +0 -151
- package/src/common/utils.table.js +0 -78
- package/src/common/utils.throttle.js +0 -83
- package/src/common/utils.tree.js +0 -18
- package/src/components/button/Button.vue +0 -195
- package/src/components/button/index.js +0 -7
- package/src/components/buttonGroup/ButtonGroup.vue +0 -11
- package/src/components/buttonGroup/index.js +0 -7
- package/src/components/calendar/Calendar.vue +0 -725
- package/src/components/calendar/index.js +0 -7
- package/src/components/calendar/uses.js +0 -1410
- package/src/components/chart/Chart.vue +0 -363
- package/src/components/chart/ChartToolbar.vue +0 -52
- package/src/components/chart/chart.core.js +0 -1170
- package/src/components/chart/chartZoom.core.js +0 -540
- package/src/components/chart/element/element.bar.js +0 -672
- package/src/components/chart/element/element.bar.time.js +0 -166
- package/src/components/chart/element/element.heatmap.js +0 -743
- package/src/components/chart/element/element.line.js +0 -611
- package/src/components/chart/element/element.pie.js +0 -197
- package/src/components/chart/element/element.scatter.js +0 -320
- package/src/components/chart/element/element.tip.js +0 -717
- package/src/components/chart/helpers/helpers.canvas.js +0 -265
- package/src/components/chart/helpers/helpers.constant.js +0 -235
- package/src/components/chart/helpers/helpers.util.js +0 -400
- package/src/components/chart/index.js +0 -9
- package/src/components/chart/model/index.js +0 -50
- package/src/components/chart/model/model.series.js +0 -125
- package/src/components/chart/model/model.store.js +0 -1427
- package/src/components/chart/plugins/plugins.interaction.js +0 -1655
- package/src/components/chart/plugins/plugins.legend.gradient.js +0 -606
- package/src/components/chart/plugins/plugins.legend.js +0 -1543
- package/src/components/chart/plugins/plugins.pie.js +0 -254
- package/src/components/chart/plugins/plugins.scrollbar.js +0 -732
- package/src/components/chart/plugins/plugins.title.js +0 -61
- package/src/components/chart/plugins/plugins.tooltip.js +0 -1041
- package/src/components/chart/scale/scale.js +0 -951
- package/src/components/chart/scale/scale.linear.js +0 -268
- package/src/components/chart/scale/scale.logarithmic.js +0 -135
- package/src/components/chart/scale/scale.step.js +0 -430
- package/src/components/chart/scale/scale.time.category.js +0 -338
- package/src/components/chart/scale/scale.time.js +0 -49
- package/src/components/chart/style/chart.scss +0 -405
- package/src/components/chart/uses.js +0 -721
- package/src/components/chartBrush/ChartBrush.vue +0 -323
- package/src/components/chartBrush/chartBrush.core.js +0 -691
- package/src/components/chartBrush/index.js +0 -9
- package/src/components/chartBrush/uses.js +0 -23
- package/src/components/chartGroup/ChartGroup.vue +0 -144
- package/src/components/chartGroup/index.js +0 -9
- package/src/components/chartGroup/style/chartGroup.scss +0 -5
- package/src/components/chartGroup/uses.js +0 -53
- package/src/components/checkbox/Checkbox.vue +0 -229
- package/src/components/checkbox/index.js +0 -7
- package/src/components/checkboxGroup/CheckboxGroup.vue +0 -44
- package/src/components/checkboxGroup/index.js +0 -7
- package/src/components/contextMenu/ContextMenu.vue +0 -95
- package/src/components/contextMenu/MenuList.vue +0 -182
- package/src/components/contextMenu/index.js +0 -7
- package/src/components/contextMenu/uses.js +0 -223
- package/src/components/datePicker/DatePicker.vue +0 -504
- package/src/components/datePicker/index.js +0 -7
- package/src/components/datePicker/uses.js +0 -460
- package/src/components/grid/Grid.vue +0 -1535
- package/src/components/grid/GridColumnSetting.vue +0 -358
- package/src/components/grid/GridFilterSetting.vue +0 -323
- package/src/components/grid/GridPagination.vue +0 -75
- package/src/components/grid/GridSummary.vue +0 -314
- package/src/components/grid/GridToolbar.vue +0 -35
- package/src/components/grid/icon/icon-option-button.vue +0 -17
- package/src/components/grid/icon/icon-sort-button.vue +0 -67
- package/src/components/grid/index.js +0 -11
- package/src/components/grid/style/grid.scss +0 -417
- package/src/components/grid/uses.js +0 -1629
- package/src/components/icon/Icon.vue +0 -53
- package/src/components/icon/index.js +0 -8
- package/src/components/inputNumber/InputNumber.vue +0 -212
- package/src/components/inputNumber/index.js +0 -7
- package/src/components/inputNumber/uses.js +0 -217
- package/src/components/loading/Loading.vue +0 -125
- package/src/components/loading/index.js +0 -7
- package/src/components/menu/Menu.vue +0 -79
- package/src/components/menu/MenuItem.vue +0 -201
- package/src/components/menu/index.js +0 -7
- package/src/components/message/Message.vue +0 -229
- package/src/components/message/index.js +0 -34
- package/src/components/messageBox/MessageBox.vue +0 -358
- package/src/components/messageBox/index.js +0 -22
- package/src/components/notification/Notification.vue +0 -316
- package/src/components/notification/index.js +0 -49
- package/src/components/pagination/Pagination.vue +0 -317
- package/src/components/pagination/index.js +0 -7
- package/src/components/pagination/pageButton.vue +0 -31
- package/src/components/progress/Progress.vue +0 -139
- package/src/components/progress/index.js +0 -7
- package/src/components/radio/Radio.vue +0 -159
- package/src/components/radio/index.js +0 -7
- package/src/components/radioGroup/RadioGroup.vue +0 -41
- package/src/components/radioGroup/index.js +0 -7
- package/src/components/scheduler/Scheduler.vue +0 -149
- package/src/components/scheduler/index.js +0 -7
- package/src/components/scheduler/uses.js +0 -183
- package/src/components/select/Select.vue +0 -556
- package/src/components/select/index.js +0 -7
- package/src/components/select/uses.js +0 -379
- package/src/components/slider/Slider.vue +0 -505
- package/src/components/slider/index.js +0 -7
- package/src/components/slider/uses.js +0 -391
- package/src/components/tabPanel/TabPanel.vue +0 -74
- package/src/components/tabPanel/index.js +0 -7
- package/src/components/tabs/Tabs.vue +0 -517
- package/src/components/tabs/index.js +0 -7
- package/src/components/textField/TextField.vue +0 -399
- package/src/components/textField/index.js +0 -7
- package/src/components/timePicker/TimePicker.vue +0 -364
- package/src/components/timePicker/index.js +0 -7
- package/src/components/toggle/Toggle.vue +0 -115
- package/src/components/toggle/index.js +0 -7
- package/src/components/tree/Tree.vue +0 -338
- package/src/components/tree/TreeNode.vue +0 -293
- package/src/components/tree/index.js +0 -7
- package/src/components/treeGrid/TreeGrid.vue +0 -1074
- package/src/components/treeGrid/TreeGridNode.vue +0 -349
- package/src/components/treeGrid/TreeGridToolbar.vue +0 -35
- package/src/components/treeGrid/icon/icon-tree.png +0 -0
- package/src/components/treeGrid/index.js +0 -9
- package/src/components/treeGrid/style/treeGrid.scss +0 -277
- package/src/components/treeGrid/uses.js +0 -1178
- package/src/components/window/Window.vue +0 -329
- package/src/components/window/index.js +0 -7
- package/src/components/window/uses.js +0 -908
- package/src/directives/clickoutside.js +0 -90
- package/src/main.js +0 -120
- package/src/style/components/input.scss +0 -108
- package/src/style/functions.scss +0 -3
- package/src/style/index.scss +0 -6
- package/src/style/lib/fonts/EVUI.eot +0 -0
- package/src/style/lib/fonts/EVUI.svg +0 -293
- package/src/style/lib/fonts/EVUI.ttf +0 -0
- package/src/style/lib/fonts/EVUI.woff +0 -0
- package/src/style/lib/icon.css +0 -888
- package/src/style/mixins.scss +0 -94
- package/src/style/themes.scss +0 -69
- package/src/style/variables.scss +0 -22
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import Canvas from '../helpers/helpers.canvas';
|
|
2
|
-
import Bar from './element.bar';
|
|
3
|
-
import Util from '../helpers/helpers.util';
|
|
4
|
-
|
|
5
|
-
class TimeBar extends Bar {
|
|
6
|
-
/**
|
|
7
|
-
* Draw series data
|
|
8
|
-
* It shows partial bar item as time goes by.
|
|
9
|
-
* @param {object} param object for drawing series data
|
|
10
|
-
*
|
|
11
|
-
* @returns {undefined}
|
|
12
|
-
*/
|
|
13
|
-
draw(param) {
|
|
14
|
-
if (!this.show) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const ctx = param.ctx;
|
|
19
|
-
const chartRect = param.chartRect;
|
|
20
|
-
const labelOffset = param.labelOffset;
|
|
21
|
-
const axesSteps = param.axesSteps;
|
|
22
|
-
const showIndex = param.showIndex;
|
|
23
|
-
const isHorizontal = param.isHorizontal;
|
|
24
|
-
const thickness = param.thickness;
|
|
25
|
-
const showSeriesCount = param.showSeriesCount;
|
|
26
|
-
|
|
27
|
-
let x;
|
|
28
|
-
let y;
|
|
29
|
-
|
|
30
|
-
const minmaxX = axesSteps.x[this.xAxisIndex];
|
|
31
|
-
const minmaxY = axesSteps.y[this.yAxisIndex];
|
|
32
|
-
|
|
33
|
-
const xArea = chartRect.chartWidth - (labelOffset.left + labelOffset.right);
|
|
34
|
-
const yArea = chartRect.chartHeight - (labelOffset.top + labelOffset.bottom);
|
|
35
|
-
const xsp = chartRect.x1 + labelOffset.left;
|
|
36
|
-
const ysp = chartRect.y2 - labelOffset.bottom;
|
|
37
|
-
const xep = chartRect.x2 - labelOffset.right;
|
|
38
|
-
|
|
39
|
-
const dArea = isHorizontal ? yArea : xArea;
|
|
40
|
-
const cArea = dArea / (this.data.length || 1);
|
|
41
|
-
const cPad = 2;
|
|
42
|
-
|
|
43
|
-
let bArea;
|
|
44
|
-
if (this.isExistGrp) {
|
|
45
|
-
bArea = (cArea - (cPad * 2));
|
|
46
|
-
} else {
|
|
47
|
-
bArea = (cArea - (cPad * 2)) / showSeriesCount;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const getSize = () => {
|
|
51
|
-
if (typeof thickness === 'string' && /[0-9]+px/.test(thickness)) {
|
|
52
|
-
return Math.min(bArea, Number(thickness.replace('px', '')));
|
|
53
|
-
}
|
|
54
|
-
if (typeof thickness === 'number' && thickness <= 1 && thickness >= 0) {
|
|
55
|
-
return Math.ceil(bArea * thickness);
|
|
56
|
-
}
|
|
57
|
-
return bArea;
|
|
58
|
-
};
|
|
59
|
-
const size = getSize();
|
|
60
|
-
|
|
61
|
-
let w = isHorizontal ? null : size;
|
|
62
|
-
let subW = isHorizontal ? null : size;
|
|
63
|
-
let h = isHorizontal ? size : null;
|
|
64
|
-
|
|
65
|
-
const bPad = isHorizontal ? (bArea - h) / 2 : (bArea - w) / 2;
|
|
66
|
-
const barSeriesX = this.isExistGrp ? 1 : showIndex + 1;
|
|
67
|
-
|
|
68
|
-
this.size.cat = cArea;
|
|
69
|
-
this.size.bar = bArea;
|
|
70
|
-
this.size.cPad = cPad;
|
|
71
|
-
this.size.bPad = bPad;
|
|
72
|
-
this.size.w = w;
|
|
73
|
-
this.size.ix = barSeriesX;
|
|
74
|
-
this.chartRect = chartRect;
|
|
75
|
-
this.labelOffset = labelOffset;
|
|
76
|
-
this.borderRadius = param.borderRadius;
|
|
77
|
-
|
|
78
|
-
this.data.forEach((item, index) => {
|
|
79
|
-
ctx.beginPath();
|
|
80
|
-
|
|
81
|
-
if (isHorizontal) {
|
|
82
|
-
x = xsp;
|
|
83
|
-
y = Canvas.calculateY(item.y, minmaxY.graphMin, minmaxY.graphMax, yArea, ysp);
|
|
84
|
-
} else {
|
|
85
|
-
x = Canvas.calculateSubX(item.x, minmaxX.graphMin, minmaxX.graphMax, xArea, xsp);
|
|
86
|
-
if (x < xsp) {
|
|
87
|
-
subW -= xsp - x;
|
|
88
|
-
x = (x + w < xsp) ? null : xsp;
|
|
89
|
-
} else if (x + w > xep) {
|
|
90
|
-
subW -= subW - (xep - x);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (x >= xep) {
|
|
94
|
-
x = null;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (x !== null) {
|
|
98
|
-
x += Math.ceil(bArea * barSeriesX) - Math.round(w + bPad);
|
|
99
|
-
}
|
|
100
|
-
y = ysp;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (isHorizontal) {
|
|
104
|
-
if (item.b) {
|
|
105
|
-
w = Canvas.calculateX(item.x - item.b, minmaxX.graphMin, minmaxX.graphMax, xArea);
|
|
106
|
-
x = Canvas.calculateX(item.b, minmaxX.graphMin, minmaxX.graphMax, xArea, xsp);
|
|
107
|
-
} else {
|
|
108
|
-
w = Canvas.calculateX(item.x, minmaxX.graphMin, minmaxX.graphMax, xArea);
|
|
109
|
-
}
|
|
110
|
-
} else if (item.b) { // vertical stack bar chart
|
|
111
|
-
h = Canvas.calculateY(item.y - item.b, minmaxY.graphMin, minmaxY.graphMax, yArea);
|
|
112
|
-
y = Canvas.calculateY(item.b, minmaxY.graphMin, minmaxY.graphMax, yArea, ysp);
|
|
113
|
-
} else { // vertical bar chart
|
|
114
|
-
h = Canvas.calculateY(item.y, minmaxY.graphMin, minmaxY.graphMax, yArea);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (x !== null && y !== null) {
|
|
118
|
-
const barColor = item.dataColor || this.color;
|
|
119
|
-
const noneDownplayOpacity = barColor.includes('rgba') ? Util.getOpacity(barColor) : 1;
|
|
120
|
-
const opacity = this.state === 'downplay' ? 0.1 : noneDownplayOpacity;
|
|
121
|
-
|
|
122
|
-
if (typeof barColor !== 'string') {
|
|
123
|
-
w = w !== subW ? subW : w;
|
|
124
|
-
|
|
125
|
-
ctx.fillStyle = Canvas.createGradient(
|
|
126
|
-
ctx,
|
|
127
|
-
isHorizontal,
|
|
128
|
-
{ x, y, w, h },
|
|
129
|
-
barColor,
|
|
130
|
-
opacity === 0.1,
|
|
131
|
-
);
|
|
132
|
-
} else {
|
|
133
|
-
ctx.fillStyle = Util.colorStringToRgba(barColor, opacity);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
this.drawBar({
|
|
137
|
-
ctx,
|
|
138
|
-
positions: { x, y, w, h },
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
if (this.showValue.use) {
|
|
142
|
-
this.drawValueLabels({
|
|
143
|
-
context: ctx,
|
|
144
|
-
data: item,
|
|
145
|
-
positions: {
|
|
146
|
-
x,
|
|
147
|
-
y,
|
|
148
|
-
h,
|
|
149
|
-
w,
|
|
150
|
-
},
|
|
151
|
-
isHighlight: false,
|
|
152
|
-
index,
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
subW = w;
|
|
157
|
-
|
|
158
|
-
item.xp = x; // eslint-disable-line
|
|
159
|
-
item.yp = y; // eslint-disable-line
|
|
160
|
-
item.w = w; // eslint-disable-line
|
|
161
|
-
item.h = isHorizontal ? -h : h; // eslint-disable-line
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export default TimeBar;
|