@msrajawat298/do-graphs 1.0.1 → 1.0.3
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/dist/App.js +124 -124
- package/dist/App.test.js +8 -8
- package/dist/Components/Charts/Bar/Form.js +231 -231
- package/dist/Components/Charts/Bar/Format.js +43 -43
- package/dist/Components/Charts/Bar/index.js +106 -106
- package/dist/Components/Charts/DoughnutAndPie/Form.js +232 -232
- package/dist/Components/Charts/DoughnutAndPie/Format.js +52 -52
- package/dist/Components/Charts/DoughnutAndPie/index.js +106 -106
- package/dist/Components/Charts/DrawGraph.js +32 -32
- package/dist/Components/Charts/Line/Form.js +231 -231
- package/dist/Components/Charts/Line/Format.js +47 -47
- package/dist/Components/Charts/Line/index.js +106 -106
- package/dist/Components/Charts/MixedChart/index.js +107 -107
- package/dist/Components/Charts/Options.js +139 -139
- package/dist/Components/Charts/PolarArea/Form.js +225 -225
- package/dist/Components/Charts/PolarArea/Format.js +42 -42
- package/dist/Components/Charts/PolarArea/index.js +106 -106
- package/dist/Components/Charts/Progess/Form.js +107 -107
- package/dist/Components/Charts/Progess/index.js +119 -119
- package/dist/Components/Charts/Scatter/Form.js +225 -225
- package/dist/Components/Charts/Scatter/Format.js +45 -45
- package/dist/Components/Charts/Scatter/index.js +106 -106
- package/dist/Components/Charts/Table/Form.js +70 -70
- package/dist/Components/Charts/Table/Styles.js +27 -27
- package/dist/Components/Charts/Table/index.js +56 -56
- package/dist/Components/Common/CustomComponent/index.js +85 -83
- package/dist/Components/Common/Menu/DynamicMenu/List.js +43 -43
- package/dist/Components/Common/Menu/DynamicMenu/index.js +155 -155
- package/dist/Components/Common/Menu/index.js +24 -24
- package/dist/Components/Common/Model/Model.js +56 -56
- package/dist/Components/Common/MultipleSelectDropdown/index.js +124 -124
- package/dist/Components/Common/NotFound/index.js +19 -19
- package/dist/Components/Common/Title/Form.js +36 -36
- package/dist/Components/Common/Title/Styles.js +16 -16
- package/dist/Components/Common/Title/index.js +41 -41
- package/dist/Components/Common/Widget/index.js +407 -407
- package/dist/Pages/Dashboard/CreatePage.js +115 -115
- package/dist/Pages/Dashboard/index.js +150 -150
- package/dist/Pages/LayoutPages/index.js +143 -143
- package/dist/Pages/Layouts/index.js +52 -52
- package/dist/Services/Menu.js +58 -58
- package/dist/Services/Routing.js +80 -80
- package/dist/Utility/Contexts.js +20 -20
- package/dist/Utility/Main.js +368 -368
- package/dist/Utility/Routes.js +10 -10
- package/dist/index.js +15 -15
- package/dist/reportWebVitals.js +13 -13
- package/dist/setupTests.js +5 -5
- package/package.json +5 -4
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
import { ChartTypes, GraphConfigs } from "../../Utility/Main";
|
|
2
|
-
var OffsetValue = function (offsetCharts, chartType, otherOptions) {
|
|
3
|
-
if (offsetCharts === null || offsetCharts === void 0 ? void 0 : offsetCharts.includes(chartType)) {
|
|
4
|
-
if ((otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.indexAxis) === 'x') {
|
|
5
|
-
return true;
|
|
6
|
-
}
|
|
7
|
-
else if ((otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.indexAxis) === 'y') {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
return true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export var ChartOptions = function (chartType, otherOptions) {
|
|
19
|
-
var offsetCharts = [ChartTypes.BAR];
|
|
20
|
-
var excludeScales = [ChartTypes.POLAR];
|
|
21
|
-
return {
|
|
22
|
-
responsive: true,
|
|
23
|
-
maintainAspectRatio: false,
|
|
24
|
-
aspectRatio: 2,
|
|
25
|
-
indexAxis: (otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.indexAxis) === 'y' ? 'y' : 'x',
|
|
26
|
-
layout: {
|
|
27
|
-
padding: 15
|
|
28
|
-
},
|
|
29
|
-
plugins: {
|
|
30
|
-
legend: {
|
|
31
|
-
display: false,
|
|
32
|
-
position: 'top',
|
|
33
|
-
align: 'center',
|
|
34
|
-
labels: {
|
|
35
|
-
font: {
|
|
36
|
-
family: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
37
|
-
size: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.POINT_FONT_SIZE
|
|
38
|
-
},
|
|
39
|
-
color: '#000',
|
|
40
|
-
padding: 10,
|
|
41
|
-
pointStyle: 'circle',
|
|
42
|
-
textAlign: 'center',
|
|
43
|
-
usePointStyle: true
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
scales: !excludeScales.includes(chartType) && {
|
|
48
|
-
x: {
|
|
49
|
-
stacked: false,
|
|
50
|
-
display: true,
|
|
51
|
-
offset: OffsetValue(offsetCharts, chartType, otherOptions),
|
|
52
|
-
grid: {
|
|
53
|
-
display: false,
|
|
54
|
-
color: '#eee',
|
|
55
|
-
lineWidth: 1
|
|
56
|
-
},
|
|
57
|
-
ticks: {
|
|
58
|
-
display: true,
|
|
59
|
-
color: '#000',
|
|
60
|
-
beginAtZero: true,
|
|
61
|
-
font: {
|
|
62
|
-
size: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.TICK_FONT_SIZE,
|
|
63
|
-
family: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
64
|
-
weight: '500'
|
|
65
|
-
},
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
y: {
|
|
69
|
-
stacked: false,
|
|
70
|
-
display: true,
|
|
71
|
-
grid: {
|
|
72
|
-
display: false,
|
|
73
|
-
color: '#eee',
|
|
74
|
-
lineWidth: 1
|
|
75
|
-
},
|
|
76
|
-
ticks: {
|
|
77
|
-
display: true,
|
|
78
|
-
color: '#000',
|
|
79
|
-
beginAtZero: true,
|
|
80
|
-
font: {
|
|
81
|
-
size: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.TICK_FONT_SIZE,
|
|
82
|
-
family: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
83
|
-
weight: '500'
|
|
84
|
-
},
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
export var DoughnutAndPieOptions = function (chartType) {
|
|
91
|
-
return {
|
|
92
|
-
responsive: true,
|
|
93
|
-
maintainAspectRatio: false,
|
|
94
|
-
aspectRatio: 2,
|
|
95
|
-
rotation: 0,
|
|
96
|
-
circumference: 360,
|
|
97
|
-
cutout: chartType === ChartTypes.DOUGHNUT ? '50%' : '0%',
|
|
98
|
-
layout: {
|
|
99
|
-
padding: 15
|
|
100
|
-
},
|
|
101
|
-
plugins: {
|
|
102
|
-
title: {
|
|
103
|
-
display: false,
|
|
104
|
-
text: 'Bar Chart',
|
|
105
|
-
font: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
106
|
-
color: '#000',
|
|
107
|
-
padding: 5,
|
|
108
|
-
align: 'center',
|
|
109
|
-
position: 'top'
|
|
110
|
-
},
|
|
111
|
-
legend: {
|
|
112
|
-
display: false,
|
|
113
|
-
position: 'top',
|
|
114
|
-
align: 'center',
|
|
115
|
-
title: {
|
|
116
|
-
display: false,
|
|
117
|
-
text: 'Bar Chart',
|
|
118
|
-
font: {
|
|
119
|
-
family: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
120
|
-
size: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.POINT_FONT_SIZE
|
|
121
|
-
},
|
|
122
|
-
color: '#000',
|
|
123
|
-
padding: 5,
|
|
124
|
-
},
|
|
125
|
-
labels: {
|
|
126
|
-
font: {
|
|
127
|
-
family: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
128
|
-
size: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.POINT_FONT_SIZE
|
|
129
|
-
},
|
|
130
|
-
color: '#000',
|
|
131
|
-
padding: 10,
|
|
132
|
-
pointStyle: 'circle',
|
|
133
|
-
textAlign: 'center',
|
|
134
|
-
usePointStyle: true
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
};
|
|
1
|
+
import { ChartTypes, GraphConfigs } from "../../Utility/Main";
|
|
2
|
+
var OffsetValue = function (offsetCharts, chartType, otherOptions) {
|
|
3
|
+
if (offsetCharts === null || offsetCharts === void 0 ? void 0 : offsetCharts.includes(chartType)) {
|
|
4
|
+
if ((otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.indexAxis) === 'x') {
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
else if ((otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.indexAxis) === 'y') {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export var ChartOptions = function (chartType, otherOptions) {
|
|
19
|
+
var offsetCharts = [ChartTypes.BAR];
|
|
20
|
+
var excludeScales = [ChartTypes.POLAR];
|
|
21
|
+
return {
|
|
22
|
+
responsive: true,
|
|
23
|
+
maintainAspectRatio: false,
|
|
24
|
+
aspectRatio: 2,
|
|
25
|
+
indexAxis: (otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.indexAxis) === 'y' ? 'y' : 'x',
|
|
26
|
+
layout: {
|
|
27
|
+
padding: 15
|
|
28
|
+
},
|
|
29
|
+
plugins: {
|
|
30
|
+
legend: {
|
|
31
|
+
display: false,
|
|
32
|
+
position: 'top',
|
|
33
|
+
align: 'center',
|
|
34
|
+
labels: {
|
|
35
|
+
font: {
|
|
36
|
+
family: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
37
|
+
size: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.POINT_FONT_SIZE
|
|
38
|
+
},
|
|
39
|
+
color: '#000',
|
|
40
|
+
padding: 10,
|
|
41
|
+
pointStyle: 'circle',
|
|
42
|
+
textAlign: 'center',
|
|
43
|
+
usePointStyle: true
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
scales: !excludeScales.includes(chartType) && {
|
|
48
|
+
x: {
|
|
49
|
+
stacked: false,
|
|
50
|
+
display: true,
|
|
51
|
+
offset: OffsetValue(offsetCharts, chartType, otherOptions),
|
|
52
|
+
grid: {
|
|
53
|
+
display: false,
|
|
54
|
+
color: '#eee',
|
|
55
|
+
lineWidth: 1
|
|
56
|
+
},
|
|
57
|
+
ticks: {
|
|
58
|
+
display: true,
|
|
59
|
+
color: '#000',
|
|
60
|
+
beginAtZero: true,
|
|
61
|
+
font: {
|
|
62
|
+
size: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.TICK_FONT_SIZE,
|
|
63
|
+
family: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
64
|
+
weight: '500'
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
y: {
|
|
69
|
+
stacked: false,
|
|
70
|
+
display: true,
|
|
71
|
+
grid: {
|
|
72
|
+
display: false,
|
|
73
|
+
color: '#eee',
|
|
74
|
+
lineWidth: 1
|
|
75
|
+
},
|
|
76
|
+
ticks: {
|
|
77
|
+
display: true,
|
|
78
|
+
color: '#000',
|
|
79
|
+
beginAtZero: true,
|
|
80
|
+
font: {
|
|
81
|
+
size: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.TICK_FONT_SIZE,
|
|
82
|
+
family: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
83
|
+
weight: '500'
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export var DoughnutAndPieOptions = function (chartType) {
|
|
91
|
+
return {
|
|
92
|
+
responsive: true,
|
|
93
|
+
maintainAspectRatio: false,
|
|
94
|
+
aspectRatio: 2,
|
|
95
|
+
rotation: 0,
|
|
96
|
+
circumference: 360,
|
|
97
|
+
cutout: chartType === ChartTypes.DOUGHNUT ? '50%' : '0%',
|
|
98
|
+
layout: {
|
|
99
|
+
padding: 15
|
|
100
|
+
},
|
|
101
|
+
plugins: {
|
|
102
|
+
title: {
|
|
103
|
+
display: false,
|
|
104
|
+
text: 'Bar Chart',
|
|
105
|
+
font: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
106
|
+
color: '#000',
|
|
107
|
+
padding: 5,
|
|
108
|
+
align: 'center',
|
|
109
|
+
position: 'top'
|
|
110
|
+
},
|
|
111
|
+
legend: {
|
|
112
|
+
display: false,
|
|
113
|
+
position: 'top',
|
|
114
|
+
align: 'center',
|
|
115
|
+
title: {
|
|
116
|
+
display: false,
|
|
117
|
+
text: 'Bar Chart',
|
|
118
|
+
font: {
|
|
119
|
+
family: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
120
|
+
size: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.POINT_FONT_SIZE
|
|
121
|
+
},
|
|
122
|
+
color: '#000',
|
|
123
|
+
padding: 5,
|
|
124
|
+
},
|
|
125
|
+
labels: {
|
|
126
|
+
font: {
|
|
127
|
+
family: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.FONT_FAMILY,
|
|
128
|
+
size: GraphConfigs === null || GraphConfigs === void 0 ? void 0 : GraphConfigs.POINT_FONT_SIZE
|
|
129
|
+
},
|
|
130
|
+
color: '#000',
|
|
131
|
+
padding: 10,
|
|
132
|
+
pointStyle: 'circle',
|
|
133
|
+
textAlign: 'center',
|
|
134
|
+
usePointStyle: true
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
};
|