impaktapps-design 0.2.79 → 0.2.86

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.
@@ -1,12 +1,16 @@
1
1
  const Product1 = [
2
- { x: "a", y: 100 },
3
- { x: "b", y: 50 },
4
- { x: "c", y: 100 },
5
- { x: "d", y: 80 },
6
- { x: "f", y: 100 },
7
- { x: "g", y: 50 },
8
- ];
9
-
2
+ {
3
+ "key": "key1",
4
+ "value": [
5
+ { "x": "01:00", "y": 123 },{ "x": "02:00", "y": 118 },{ "x": "03:00", "y": 141 },
6
+ { "x": "04:00", "y": 114 },{ "x": "05:00", "y": 108 },{ "x": "06:00", "y": 123 },
7
+ { "x": "07:00", "y": 128 },{ "x": "08:00", "y": 134 },{ "x": "09:00", "y": 131 },
8
+ { "x": "10:00", "y": 134 },{ "x": "11:00", "y": 118 },{ "x": "11:00", "y": 10 },
9
+ { "x": "12:00", "y": 130 },{ "x": "13:00", "y": 133 },{ "x": "14:00", "y": 132 },
10
+ { "x": "15:00", "y": 1 },{ "x": "15:00", "y": 137 },{ "x": "16:00", "y": 120 }
11
+ ]
12
+ },
13
+ ]
10
14
  export const finalDataProvider = (type: string, value: any,theme?:any) => {
11
15
  switch (type) {
12
16
  case "BarGraph":
@@ -85,7 +89,6 @@ export const finalDataProvider = (type: string, value: any,theme?:any) => {
85
89
  }
86
90
  };
87
91
  case "PieGraph":
88
-
89
92
  return {
90
93
  main: {
91
94
  data: value?.main?.data || [{ branch: "Kotak", value: 500 }, { branch: "SBI", value: 700 }, { branch: "HDFC", value: 900 }],
@@ -162,7 +165,7 @@ export const finalDataProvider = (type: string, value: any,theme?:any) => {
162
165
  },
163
166
  },
164
167
  pieStyle: {
165
- colorRange: ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)","#3f84b5","#b5993f","#fc6f6f"],
168
+ colorRange: theme.chartColours.pieChartColours,
166
169
  outerRadius: 120,
167
170
  innerRadius: 60,
168
171
  cornerRadius: 2,
@@ -175,32 +178,33 @@ export const finalDataProvider = (type: string, value: any,theme?:any) => {
175
178
  return {
176
179
 
177
180
  main: {
178
- data: value?.main?.data || [Product1],
181
+ data: value?.main?.data || Product1,
179
182
  header: "Line Graph Dynamic",
180
183
  bottomLabel: "Name of Employe",
181
184
  leftLabel: "Value",
185
+ legendAvailable: true,
182
186
  gridHidden: true,
183
187
  numHidden: false,
184
188
  tooltipDataKey: ["MAMA New Project", "Second", "Third"],
185
189
  axisLeft: true,
186
- legendAvailable:true,
190
+
187
191
  axisBottom: true,
188
192
  hideLeftAxisLine: false,
189
193
  hideBottomAxisLine: false,
190
194
  ...value?.main,
191
195
  legend: {
192
196
  labelColor:theme.palette.text.primary,
193
- legendTitle: "Our Assests",
197
+ // legendTitle: "Our Assests",
194
198
  direction: "row",
195
199
  align: "right",
196
- // colorRectWidth: 20,
200
+ colorRectWidth: 20,
197
201
  ...value?.main?.legend
198
202
  },
199
203
  },
200
204
  style: {
201
205
  containerStyle: {
202
206
  background:theme.palette.secondary.main,
203
- width: "100%",
207
+ width: "90%",
204
208
  height: "300",
205
209
  borderRadius: "20px",
206
210
  padding: "10px 0 2px 0",
@@ -217,28 +221,6 @@ export const finalDataProvider = (type: string, value: any,theme?:any) => {
217
221
  color:theme.palette.text.primary,
218
222
  ...value?.style?.headerStyle
219
223
  },
220
- legendStyle: {
221
- legend: {
222
- lineHeight: "0.9em",
223
- color: theme.palette.text.primary,
224
- fontSize: "10px",
225
-
226
- fontFamily: "arial",
227
- padding: "10px 10px",
228
- float: "left",
229
- border: "1px solid rgba(255, 255, 255, 0.3)",
230
- borderRadius: " 8px",
231
- margin: "5px 5px",
232
- ...value?.style?.legendStyle?.legend,
233
- },
234
- legendTitle: {
235
- fontWeight: 500,
236
- marginBottom: "5px",
237
- fontFamily: "roboto",
238
- fontSize: "10px",
239
- ...value?.style?.legendStyle?.legendTitle,
240
- },
241
- },
242
224
  labelStyle: {
243
225
  labelColor:theme.palette.text.primary,
244
226
  bottomLabelOffset: 20,
@@ -247,7 +229,7 @@ export const finalDataProvider = (type: string, value: any,theme?:any) => {
247
229
  ...value?.style?.labelStyle
248
230
  },
249
231
  lineStyle: {
250
- colorRange: ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)"],
232
+ colorRange: theme.chartColours.lineChartColours,
251
233
  lineAreaColor: "none",
252
234
  lineAreaOpacity: 0.2,
253
235
  ...value?.style?.lineStyle
@@ -1,20 +0,0 @@
1
- .axisBottom{
2
- display: block;
3
- /* @media screen and (min-width: 480px) {
4
- .axisBottom {
5
- display: none;
6
- }
7
- } */
8
- }
9
- @media (max-width: 768px) {
10
- .axisBottom {
11
- display: none;
12
- }
13
- }
14
-
15
-
16
-
17
-
18
-
19
-
20
-