@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.
Files changed (49) hide show
  1. package/dist/App.js +124 -124
  2. package/dist/App.test.js +8 -8
  3. package/dist/Components/Charts/Bar/Form.js +231 -231
  4. package/dist/Components/Charts/Bar/Format.js +43 -43
  5. package/dist/Components/Charts/Bar/index.js +106 -106
  6. package/dist/Components/Charts/DoughnutAndPie/Form.js +232 -232
  7. package/dist/Components/Charts/DoughnutAndPie/Format.js +52 -52
  8. package/dist/Components/Charts/DoughnutAndPie/index.js +106 -106
  9. package/dist/Components/Charts/DrawGraph.js +32 -32
  10. package/dist/Components/Charts/Line/Form.js +231 -231
  11. package/dist/Components/Charts/Line/Format.js +47 -47
  12. package/dist/Components/Charts/Line/index.js +106 -106
  13. package/dist/Components/Charts/MixedChart/index.js +107 -107
  14. package/dist/Components/Charts/Options.js +139 -139
  15. package/dist/Components/Charts/PolarArea/Form.js +225 -225
  16. package/dist/Components/Charts/PolarArea/Format.js +42 -42
  17. package/dist/Components/Charts/PolarArea/index.js +106 -106
  18. package/dist/Components/Charts/Progess/Form.js +107 -107
  19. package/dist/Components/Charts/Progess/index.js +119 -119
  20. package/dist/Components/Charts/Scatter/Form.js +225 -225
  21. package/dist/Components/Charts/Scatter/Format.js +45 -45
  22. package/dist/Components/Charts/Scatter/index.js +106 -106
  23. package/dist/Components/Charts/Table/Form.js +70 -70
  24. package/dist/Components/Charts/Table/Styles.js +27 -27
  25. package/dist/Components/Charts/Table/index.js +56 -56
  26. package/dist/Components/Common/CustomComponent/index.js +85 -83
  27. package/dist/Components/Common/Menu/DynamicMenu/List.js +43 -43
  28. package/dist/Components/Common/Menu/DynamicMenu/index.js +155 -155
  29. package/dist/Components/Common/Menu/index.js +24 -24
  30. package/dist/Components/Common/Model/Model.js +56 -56
  31. package/dist/Components/Common/MultipleSelectDropdown/index.js +124 -124
  32. package/dist/Components/Common/NotFound/index.js +19 -19
  33. package/dist/Components/Common/Title/Form.js +36 -36
  34. package/dist/Components/Common/Title/Styles.js +16 -16
  35. package/dist/Components/Common/Title/index.js +41 -41
  36. package/dist/Components/Common/Widget/index.js +407 -407
  37. package/dist/Pages/Dashboard/CreatePage.js +115 -115
  38. package/dist/Pages/Dashboard/index.js +150 -150
  39. package/dist/Pages/LayoutPages/index.js +143 -143
  40. package/dist/Pages/Layouts/index.js +52 -52
  41. package/dist/Services/Menu.js +58 -58
  42. package/dist/Services/Routing.js +80 -80
  43. package/dist/Utility/Contexts.js +20 -20
  44. package/dist/Utility/Main.js +368 -368
  45. package/dist/Utility/Routes.js +10 -10
  46. package/dist/index.js +15 -15
  47. package/dist/reportWebVitals.js +13 -13
  48. package/dist/setupTests.js +5 -5
  49. 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
+ };