@wavemaker/app-rn-runtime 11.14.1-20.6468 → 11.14.1-21.64739

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 (104) hide show
  1. package/components/basic/bottomsheet/bottomsheet.component.js +0 -12
  2. package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
  3. package/components/basic/progress-circle/progress-circle.component.js +3 -3
  4. package/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  5. package/components/chart/area-chart/area-chart.component.js +9 -26
  6. package/components/chart/area-chart/area-chart.component.js.map +1 -1
  7. package/components/chart/bar-chart/bar-chart.component.js +6 -38
  8. package/components/chart/bar-chart/bar-chart.component.js.map +1 -1
  9. package/components/chart/bar-chart/bar-chart.props.js +0 -1
  10. package/components/chart/bar-chart/bar-chart.props.js.map +1 -1
  11. package/components/chart/basechart.component.js +15 -8
  12. package/components/chart/basechart.component.js.map +1 -1
  13. package/components/chart/basechart.props.js +0 -1
  14. package/components/chart/basechart.props.js.map +1 -1
  15. package/components/chart/bubble-chart/bubble-chart.component.js +5 -22
  16. package/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  17. package/components/chart/line-chart/line-chart.component.js +5 -22
  18. package/components/chart/line-chart/line-chart.component.js.map +1 -1
  19. package/components/chart/pie-chart/pie-chart.component.js +3 -14
  20. package/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  21. package/components/container/tabs/tabs.component.js +29 -62
  22. package/components/container/tabs/tabs.component.js.map +1 -1
  23. package/components/container/tabs/tabs.props.js +0 -1
  24. package/components/container/tabs/tabs.props.js.map +1 -1
  25. package/components/container/wizard/wizard.component.js +1 -1
  26. package/components/container/wizard/wizard.component.js.map +1 -1
  27. package/components/container/wizard/wizard.props.js +1 -0
  28. package/components/container/wizard/wizard.props.js.map +1 -1
  29. package/components/container/wizard/wizardstep/wizardstep.component.js +2 -2
  30. package/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  31. package/components/data/form/form-field/form-field.component.js +0 -1
  32. package/components/data/form/form-field/form-field.component.js.map +1 -1
  33. package/components/data/form/form-field/form-field.props.js +0 -1
  34. package/components/data/form/form-field/form-field.props.js.map +1 -1
  35. package/components/data/form/form.component.js +1 -4
  36. package/components/data/form/form.component.js.map +1 -1
  37. package/components/dialogs/dialogcontent/dialogcontent.component.js +2 -1
  38. package/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
  39. package/components/input/baseinput/baseinput.component.js +3 -21
  40. package/components/input/baseinput/baseinput.component.js.map +1 -1
  41. package/components/input/baseinput/baseinput.props.js +0 -1
  42. package/components/input/baseinput/baseinput.props.js.map +1 -1
  43. package/components/input/basenumber/basenumber.component.js +3 -18
  44. package/components/input/basenumber/basenumber.component.js.map +1 -1
  45. package/components/input/basenumber/basenumber.props.js +0 -1
  46. package/components/input/basenumber/basenumber.props.js.map +1 -1
  47. package/components/input/checkboxset/checkboxset.component.js +1 -1
  48. package/components/input/checkboxset/checkboxset.component.js.map +1 -1
  49. package/components/input/currency/currency.component.js +0 -2
  50. package/components/input/currency/currency.component.js.map +1 -1
  51. package/components/input/currency/currency.styles.js +1 -10
  52. package/components/input/currency/currency.styles.js.map +1 -1
  53. package/components/input/number/number.component.js +0 -2
  54. package/components/input/number/number.component.js.map +1 -1
  55. package/components/input/number/number.styles.js +0 -4
  56. package/components/input/number/number.styles.js.map +1 -1
  57. package/components/input/radioset/radioset.component.js +4 -2
  58. package/components/input/radioset/radioset.component.js.map +1 -1
  59. package/components/input/text/text.component.js +0 -2
  60. package/components/input/text/text.component.js.map +1 -1
  61. package/components/input/text/text.props.js +1 -0
  62. package/components/input/text/text.props.js.map +1 -1
  63. package/components/input/text/text.styles.js +0 -17
  64. package/components/input/text/text.styles.js.map +1 -1
  65. package/components/input/textarea/textarea.component.js +0 -1
  66. package/components/input/textarea/textarea.component.js.map +1 -1
  67. package/components/input/textarea/textarea.styles.js +0 -4
  68. package/components/input/textarea/textarea.styles.js.map +1 -1
  69. package/components/navigation/popover/popover.component.js +3 -3
  70. package/components/navigation/popover/popover.component.js.map +1 -1
  71. package/core/AppConfig.js.map +1 -1
  72. package/core/advanced-promise-rejection-tracker.js +207 -0
  73. package/core/advanced-promise-rejection-tracker.js.map +1 -0
  74. package/core/base.component.js +5 -0
  75. package/core/base.component.js.map +1 -1
  76. package/core/components/error-fallback/error-fallback.component.js +50 -18
  77. package/core/components/error-fallback/error-fallback.component.js.map +1 -1
  78. package/core/components/error-fallback/error-fallback.styles.js +4 -1
  79. package/core/components/error-fallback/error-fallback.styles.js.map +1 -1
  80. package/core/components/textinput.component.js +4 -25
  81. package/core/components/textinput.component.js.map +1 -1
  82. package/core/error-boundary.component.js +46 -2
  83. package/core/error-boundary.component.js.map +1 -1
  84. package/core/fixed-view.component.js +2 -19
  85. package/core/fixed-view.component.js.map +1 -1
  86. package/core/global-error-handler.service.js +177 -0
  87. package/core/global-error-handler.service.js.map +1 -0
  88. package/core/tappable.component.js +1 -1
  89. package/core/tappable.component.js.map +1 -1
  90. package/core/viewport.js +8 -13
  91. package/core/viewport.js.map +1 -1
  92. package/gestures/carousel-swipe.animation.js +1 -0
  93. package/gestures/carousel-swipe.animation.js.map +1 -1
  94. package/npm-shrinkwrap.json +9553 -8521
  95. package/package-lock.json +9553 -8521
  96. package/package.json +2 -2
  97. package/runtime/App.js +174 -12
  98. package/runtime/App.js.map +1 -1
  99. package/runtime/base-page.component.js +11 -2
  100. package/runtime/base-page.component.js.map +1 -1
  101. package/runtime/navigator/stack.navigator.js +6 -0
  102. package/runtime/navigator/stack.navigator.js.map +1 -1
  103. package/styles/theme.js +0 -6
  104. package/styles/theme.js.map +1 -1
@@ -16,9 +16,6 @@ export default class WmBarChart extends BaseChartComponent {
16
16
  return this.abbreviateNumber(data.datum.y);
17
17
  }
18
18
  getBarChart(props) {
19
- if (props.chartheight !== undefined && props.chartheight === 0) {
20
- return /*#__PURE__*/React.createElement(React.Fragment, null);
21
- }
22
19
  const isNested = Array.isArray(this.state.data[0]) && this.state.data.length > 1;
23
20
  return this.state.data.map((d, i) => {
24
21
  return /*#__PURE__*/React.createElement(VictoryBar, _extends({
@@ -35,20 +32,9 @@ export default class WmBarChart extends BaseChartComponent {
35
32
  }) => {
36
33
  var _this$state$colors$da;
37
34
  return (_this$state$colors$da = this.state.colors[datum.x]) !== null && _this$state$colors$da !== void 0 ? _this$state$colors$da : this.state.colors[datum.x % this.state.colors.length];
38
- },
39
- stroke: isNested ? this.state.colors[i % this.state.colors.length] : ({
40
- datum
41
- }) => {
42
- var _this$state$colors$da2;
43
- return (_this$state$colors$da2 = this.state.colors[datum.x]) !== null && _this$state$colors$da2 !== void 0 ? _this$state$colors$da2 : this.state.colors[datum.x % this.state.colors.length];
44
- },
45
- strokeWidth: props.showzerothvalue ? 3 : 0
46
- }
47
- } : {
48
- data: {
49
- strokeWidth: props.showzerothvalue ? 3 : 0
35
+ }
50
36
  }
51
- },
37
+ } : {},
52
38
  cornerRadius: {
53
39
  topLeft: this.styles.bar.borderTopLeftRadius,
54
40
  topRight: this.styles.bar.borderTopRightRadius,
@@ -99,34 +85,16 @@ export default class WmBarChart extends BaseChartComponent {
99
85
  });
100
86
  }
101
87
  renderWidget(props) {
102
- var _props$chartheight, _this$styles$root, _this$styles$root2, _this$styles$root3, _this$styles$root4, _this$styles$root5, _this$styles$root6;
103
88
  this.invokeEventCallback('onBeforerender', [this.proxy, null]);
104
89
  if (!this.state.data.length) {
105
90
  return null;
106
91
  }
107
- let offsetTop = props.offsettop;
108
- let offsetHeight = 0;
109
- let victoryChartHeight = (_props$chartheight = props.chartheight) !== null && _props$chartheight !== void 0 ? _props$chartheight : this.styles.root.height;
110
- if ((_this$styles$root = this.styles.root) !== null && _this$styles$root !== void 0 && _this$styles$root.height && typeof ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height) === 'number') {
111
- offsetTop = this.styles.root.height / 250 * props.offsettop;
112
- offsetHeight = this.styles.root.height >= 250 && !props.chartheight && props.chartheight !== 0 ? 0 : offsetTop + props.offsetbottom;
113
- }
114
- if (typeof victoryChartHeight === 'number') {
115
- victoryChartHeight = victoryChartHeight + offsetHeight;
116
- }
117
- let containerStyle = {
118
- ...this.styles.root
119
- };
120
- if (containerStyle !== null && containerStyle !== void 0 && containerStyle.height) {
121
- containerStyle['minHeight'] = containerStyle['height'];
122
- delete containerStyle['height'];
123
- }
124
92
  let mindomain = {
125
93
  x: this.props.xdomain === 'Min' ? this.state.chartMinX : undefined,
126
94
  y: this.props.ydomain === 'Min' ? this.state.chartMinY : undefined
127
95
  };
128
96
  return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
129
- style: containerStyle,
97
+ style: this.styles.root,
130
98
  onLayout: this.onViewLayoutChange.bind(this)
131
99
  }), /*#__PURE__*/React.createElement(View, null, props.title || props.iconclass ? /*#__PURE__*/React.createElement(View, {
132
100
  testID: "title-icon-container",
@@ -145,16 +113,16 @@ export default class WmBarChart extends BaseChartComponent {
145
113
  ref: this.viewRef
146
114
  }, this.getTooltip(), /*#__PURE__*/React.createElement(VictoryChart, {
147
115
  theme: this.state.theme,
148
- height: victoryChartHeight,
116
+ height: this.styles.root.height,
149
117
  width: this.state.chartWidth || this.screenWidth,
150
118
  minDomain: mindomain,
151
119
  padding: {
152
- top: offsetTop,
120
+ top: props.offsettop,
153
121
  bottom: props.offsetbottom,
154
122
  left: this.isRTL ? props.offsetright : props.offsetleft,
155
123
  right: this.isRTL ? props.offsetleft : props.offsetright
156
124
  }
157
- }, this.getLegendView(undefined, (_this$styles$root3 = this.styles.root) !== null && _this$styles$root3 !== void 0 && _this$styles$root3.height && typeof ((_this$styles$root4 = this.styles.root) === null || _this$styles$root4 === void 0 ? void 0 : _this$styles$root4.height) === 'string' || (_this$styles$root5 = this.styles.root) !== null && _this$styles$root5 !== void 0 && _this$styles$root5.height && typeof ((_this$styles$root6 = this.styles.root) === null || _this$styles$root6 === void 0 ? void 0 : _this$styles$root6.height) === 'number' && this.styles.root.height >= 250 ? 0 : offsetHeight), this.getXaxis(offsetHeight), this.getYAxis(), props.viewtype === 'Stacked' ? /*#__PURE__*/React.createElement(VictoryStack, {
125
+ }, this.getLegendView(), this.getXaxis(), this.getYAxis(), props.viewtype === 'Stacked' ? /*#__PURE__*/React.createElement(VictoryStack, {
158
126
  colorScale: !this.theme ? this.state.colors : undefined
159
127
  }, this.getBarChart(props)) : /*#__PURE__*/React.createElement(VictoryGroup, {
160
128
  colorScale: !this.theme ? this.state.colors : undefined,
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","Platform","AccessibilityWidgetType","getAccessibilityProps","VictoryChart","VictoryBar","VictoryStack","VictoryGroup","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","WmIcon","WmBarChartState","WmBarChart","constructor","props","labelFn","data","abbreviateNumber","datum","y","getBarChart","chartheight","undefined","createElement","Fragment","isNested","Array","isArray","state","length","map","d","i","_extends","key","name","horizontal","labels","showvalues","bind","isRTL","toReversed","height","alignment","style","customcolors","fill","colors","_this$state$colors$da","x","stroke","_this$state$colors$da2","strokeWidth","showzerothvalue","cornerRadius","topLeft","styles","bar","borderTopLeftRadius","topRight","borderTopRightRadius","bottomLeft","borderBottomLeftRadius","bottomRight","borderBottomRightRadius","events","target","eventHandlers","OS","onClick","onSelect","onPress","barwidth","barWidth","event","viewRef","current","dataset","measureInWindow","chartX","chartY","value","index","label","xaxisDatakeyArr","selectedItem","nativeEvent","tooltipX","pageX","tooltipY","pageY","selectedChartItem","series","_dataObj","updateState","tooltipXaxis","tooltipYaxis","isTooltipOpen","tooltipXPosition","tooltipoffsetx","tooltipYPosition","tooltipoffsety","invokeEventCallback","proxy","renderWidget","_props$chartheight","_this$styles$root","_this$styles$root2","_this$styles$root3","_this$styles$root4","_this$styles$root5","_this$styles$root6","offsetTop","offsettop","offsetHeight","victoryChartHeight","root","offsetbottom","containerStyle","mindomain","xdomain","chartMinX","ydomain","chartMinY","LINECHART","onLayout","onViewLayoutChange","title","iconclass","testID","flexDirection","alignItems","icon","subheading","subHeading","ref","getTooltip","theme","width","chartWidth","screenWidth","minDomain","padding","top","bottom","left","offsetright","offsetleft","right","getLegendView","getXaxis","getYAxis","viewtype","colorScale","offset"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform, LayoutChangeEvent } from 'react-native';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport {\n VictoryChart,\n VictoryBar,\n VictoryLegend,\n VictoryStack,\n VictoryGroup\n} from \"victory-native\";\n\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport WmBarChartProps from './bar-chart.props';\nimport { DEFAULT_CLASS, WmBarChartStyles } from './bar-chart.styles';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\nimport { min } from 'moment';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmBarChartState extends BaseChartComponentState<WmBarChartProps> {}\n\nexport default class WmBarChart extends BaseChartComponent<WmBarChartProps, WmBarChartState, WmBarChartStyles> {\n\n constructor(props: WmBarChartProps) {\n super(props, DEFAULT_CLASS, new WmBarChartProps(), new WmBarChartState());\n }\n\n labelFn(data: any): string | number | string[] | number[] | null {\n return this.abbreviateNumber(data.datum.y);\n }\n\n getBarChart(props: WmBarChartProps) {\n if(props.chartheight !== undefined && props.chartheight === 0){\n return <></>\n }\n const isNested = Array.isArray(this.state.data[0]) && this.state.data.length > 1;\n return this.state.data.map((d: any, i: number) => {\n return <VictoryBar key={props.name + '_' + i}\n horizontal={props.horizontal} labels={props.showvalues ? this.labelFn.bind(this) : undefined}\n data={this.isRTL?d.toReversed():d}\n height={100}\n alignment={this.isRTL ? 'end' : 'start'}\n style={props.customcolors?{\n data: {\n fill:isNested ? this.state.colors[i % this.state.colors.length] : ({ datum }) => this.state.colors[datum.x] ?? this.state.colors[datum.x % this.state.colors.length],\n stroke: isNested ? this.state.colors[i % this.state.colors.length] : ({ datum }) => this.state.colors[datum.x] ?? this.state.colors[datum.x % this.state.colors.length],\n strokeWidth: props.showzerothvalue ? 3 : 0\n }\n }:{\n data: {\n strokeWidth: props.showzerothvalue ? 3 : 0\n }\n }}\n cornerRadius={{topLeft: this.styles.bar.borderTopLeftRadius, topRight: this.styles.bar.borderTopRightRadius, bottomLeft: this.styles.bar.borderBottomLeftRadius, bottomRight: this.styles.bar.borderBottomRightRadius}}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n {...(props.barwidth ? { barWidth: props.barwidth } : {})} />\n });\n }\n\nonSelect(event: any, data: any){\n if (!this.viewRef.current) return;\n if (!this.state.props.dataset) return;\n this.viewRef.current.measureInWindow((chartX: number, chartY: number) => {\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n const nativeEvent = event.nativeEvent;\n let tooltipX = nativeEvent.pageX - chartX;\n let tooltipY = nativeEvent.pageY - chartY;\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.updateState({\n tooltipXaxis: label,\n tooltipYaxis: value,\n isTooltipOpen: true,\n selectedItem: {...selectedItem, index: data.index},\n tooltipXPosition: tooltipX - this.state.tooltipoffsetx, \n tooltipYPosition: tooltipY - this.state.tooltipoffsety\n } as WmBarChartState)\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n });\n}\n\n renderWidget(props: WmBarChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n\n let offsetTop = props.offsettop;\n let offsetHeight = 0;\n let victoryChartHeight = props.chartheight ?? this.styles.root.height;\n\n if(this.styles.root?.height && typeof this.styles.root?.height === 'number') {\n offsetTop = (this.styles.root.height / 250) * props.offsettop;\n offsetHeight = (this.styles.root.height >= 250 && !props.chartheight && props.chartheight !== 0) ? 0 : offsetTop + props.offsetbottom;\n }\n\n if(typeof victoryChartHeight === 'number') {\n victoryChartHeight = victoryChartHeight + offsetHeight;\n }\n\n let containerStyle = {...this.styles.root}\n if(containerStyle?.height) {\n containerStyle['minHeight'] = containerStyle['height'];\n delete containerStyle['height'];\n }\n\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n return (<View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={containerStyle}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n <View>\n { (props.title || props.iconclass) ? (\n <View testID=\"title-icon-container\" style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null }\n </View>\n ) : null }\n { props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text> ) : null }\n </View>\n <View ref={this.viewRef}>\n {this.getTooltip()}\n <VictoryChart theme={this.state.theme}\n height={victoryChartHeight as number}\n width={this.state.chartWidth || this.screenWidth}\n minDomain={mindomain}\n padding={{ top: offsetTop, bottom: props.offsetbottom, left: this.isRTL ? props.offsetright : props.offsetleft, right: this.isRTL ? props.offsetleft : props.offsetright }}>\n {this.getLegendView(\n undefined, \n (\n (\n (this.styles.root?.height && typeof this.styles.root?.height === 'string') || \n (this.styles.root?.height && typeof this.styles.root?.height === 'number' && this.styles.root.height >= 250)) ? \n 0 : offsetHeight\n )\n )}\n {this.getXaxis(offsetHeight)}\n {this.getYAxis()}\n {\n props.viewtype === 'Stacked' ? <VictoryStack \n colorScale={!this.theme ? this.state.colors : undefined}>\n {\n this.getBarChart(props)\n }\n </VictoryStack> : <VictoryGroup colorScale={!this.theme ? this.state.colors : undefined} offset={10} >\n {\n this.getBarChart(props) \n }\n </VictoryGroup>\n }\n </VictoryChart></View></View>);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAA2B,cAAc;AACtE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SACEC,YAAY,EACZC,UAAU,EAEVC,YAAY,EACZC,YAAY,QACP,gBAAgB;AAEvB,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AACpE,OAAOC,MAAM,MAAM,gEAAgE;AAInF,OAAO,MAAMC,eAAe,SAASJ,uBAAuB,CAAkB;AAE9E,eAAe,MAAMK,UAAU,SAASN,kBAAkB,CAAqD;EAE7GO,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIG,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEAI,OAAOA,CAACC,IAAS,EAAgD;IAC/D,OAAO,IAAI,CAACC,gBAAgB,CAACD,IAAI,CAACE,KAAK,CAACC,CAAC,CAAC;EAC5C;EAEAC,WAAWA,CAACN,KAAsB,EAAE;IAClC,IAAGA,KAAK,CAACO,WAAW,KAAKC,SAAS,IAAIR,KAAK,CAACO,WAAW,KAAK,CAAC,EAAC;MAC5D,oBAAOzB,KAAA,CAAA2B,aAAA,CAAA3B,KAAA,CAAA4B,QAAA,MAAI,CAAC;IACd;IACA,MAAMC,QAAQ,GAAGC,KAAK,CAACC,OAAO,CAAC,IAAI,CAACC,KAAK,CAACZ,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAACY,KAAK,CAACZ,IAAI,CAACa,MAAM,GAAG,CAAC;IAChF,OAAO,IAAI,CAACD,KA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BAAA,uBAAhBA,kBAAA,CAAkBnE,MAAM,MAAK,QAAQ,IACxE,CAAAoE,kBAAA,OAAI,CAACtD,MAAM,CAAC4D,IAAI,cAAAN,kBAAA,eAAhBA,kBAAA,CAAkBpE,MAAM,IAAI,SAAAqE,kBAAA,GAAO,IAAI,CAACvD,MAAM,CAAC4D,IAAI,cAAAL,kBAAA,uBAAhBA,kBAAA,CAAkBrE,MAAM,MAAK,QAAQ,IAAI,IAAI,CAACc,MAAM,CAAC4D,IAAI,CAAC1E,MAAM,IAAI,GAAI,GAC5G,CAAC,GAAGwE,YAEV,CAAC,EACA,IAAI,CAACoC,QAAQ,CAACpC,YAAY,CAAC,EAC3B,IAAI,CAACqC,QAAQ,CAAC,CAAC,EAEdzI,KAAK,CAAC0I,QAAQ,KAAK,SAAS,gBAAG5J,KAAA,CAAA2B,aAAA,CAACnB,YAAY;MAC5CqJ,UAAU,EAAE,CAAC,IAAI,CAAChB,KAAK,GAAG,IAAI,CAAC7G,KAAK,CAACmB,MAAM,GAAGzB;IAAU,GAEpD,IAAI,CAACF,WAAW,CAACN,KAAK,CAEZ,CAAC,gBAAGlB,KAAA,CAAA2B,aAAA,CAAClB,YAAY;MAACoJ,UAAU,EAAE,CAAC,IAAI,CAAChB,KAAK,GAAG,IAAI,CAAC7G,KAAK,CAACmB,MAAM,GAAGzB,SAAU;MAAEoI,MAAM,EAAE;IAAG,GAEjG,IAAI,CAACtI,WAAW,CAACN,KAAK,CAEZ,CAEJ,CAAO,CAAO,CAAC;EAC/B;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","Platform","AccessibilityWidgetType","getAccessibilityProps","VictoryChart","VictoryBar","VictoryStack","VictoryGroup","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","WmIcon","WmBarChartState","WmBarChart","constructor","props","labelFn","data","abbreviateNumber","datum","y","getBarChart","isNested","Array","isArray","state","length","map","d","i","createElement","_extends","key","name","horizontal","labels","showvalues","bind","undefined","isRTL","toReversed","height","alignment","style","customcolors","fill","colors","_this$state$colors$da","x","cornerRadius","topLeft","styles","bar","borderTopLeftRadius","topRight","borderTopRightRadius","bottomLeft","borderBottomLeftRadius","bottomRight","borderBottomRightRadius","events","target","eventHandlers","OS","onClick","onSelect","onPress","barwidth","barWidth","event","viewRef","current","dataset","measureInWindow","chartX","chartY","value","index","label","xaxisDatakeyArr","selectedItem","nativeEvent","tooltipX","pageX","tooltipY","pageY","selectedChartItem","series","_dataObj","updateState","tooltipXaxis","tooltipYaxis","isTooltipOpen","tooltipXPosition","tooltipoffsetx","tooltipYPosition","tooltipoffsety","invokeEventCallback","proxy","renderWidget","mindomain","xdomain","chartMinX","ydomain","chartMinY","LINECHART","root","onLayout","onViewLayoutChange","title","iconclass","testID","flexDirection","alignItems","icon","subheading","subHeading","ref","getTooltip","theme","width","chartWidth","screenWidth","minDomain","padding","top","offsettop","bottom","offsetbottom","left","offsetright","offsetleft","right","getLegendView","getXaxis","getYAxis","viewtype","colorScale","offset"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform, LayoutChangeEvent } from 'react-native';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport {\n VictoryChart,\n VictoryBar,\n VictoryLegend,\n VictoryStack,\n VictoryGroup\n} from \"victory-native\";\n\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport WmBarChartProps from './bar-chart.props';\nimport { DEFAULT_CLASS, WmBarChartStyles } from './bar-chart.styles';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\nimport { min } from 'moment';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmBarChartState extends BaseChartComponentState<WmBarChartProps> {}\n\nexport default class WmBarChart extends BaseChartComponent<WmBarChartProps, WmBarChartState, WmBarChartStyles> {\n\n constructor(props: WmBarChartProps) {\n super(props, DEFAULT_CLASS, new WmBarChartProps(), new WmBarChartState());\n }\n\n labelFn(data: any): string | number | string[] | number[] | null {\n return this.abbreviateNumber(data.datum.y);\n }\n\n getBarChart(props: WmBarChartProps) {\n const isNested = Array.isArray(this.state.data[0]) && this.state.data.length > 1;\n return this.state.data.map((d: any, i: number) => {\n return <VictoryBar key={props.name + '_' + i}\n horizontal={props.horizontal} labels={props.showvalues ? this.labelFn.bind(this) : undefined}\n data={this.isRTL?d.toReversed():d}\n height={100}\n alignment={this.isRTL ? 'end' : 'start'}\n style={props.customcolors?{\n data: {\n fill:isNested ? this.state.colors[i % this.state.colors.length] : ({ datum }) => this.state.colors[datum.x] ?? this.state.colors[datum.x % this.state.colors.length]\n }\n }:{}}\n cornerRadius={{topLeft: this.styles.bar.borderTopLeftRadius, topRight: this.styles.bar.borderTopRightRadius, bottomLeft: this.styles.bar.borderBottomLeftRadius, bottomRight: this.styles.bar.borderBottomRightRadius}}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n {...(props.barwidth ? { barWidth: props.barwidth } : {})} />\n });\n }\n\nonSelect(event: any, data: any){\n if (!this.viewRef.current) return;\n if (!this.state.props.dataset) return;\n this.viewRef.current.measureInWindow((chartX: number, chartY: number) => {\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n const nativeEvent = event.nativeEvent;\n let tooltipX = nativeEvent.pageX - chartX;\n let tooltipY = nativeEvent.pageY - chartY;\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.updateState({\n tooltipXaxis: label,\n tooltipYaxis: value,\n isTooltipOpen: true,\n selectedItem: {...selectedItem, index: data.index},\n tooltipXPosition: tooltipX - this.state.tooltipoffsetx, \n tooltipYPosition: tooltipY - this.state.tooltipoffsety\n } as WmBarChartState)\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n });\n}\n\n renderWidget(props: WmBarChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n return (<View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n <View>\n { (props.title || props.iconclass) ? (\n <View testID=\"title-icon-container\" style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null }\n </View>\n ) : null }\n { props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text> ) : null }\n </View>\n <View ref={this.viewRef}>\n {this.getTooltip()}\n <VictoryChart theme={this.state.theme}\n height={(this.styles.root.height) as number}\n width={this.state.chartWidth || this.screenWidth}\n minDomain={mindomain}\n padding={{ top: props.offsettop, bottom: props.offsetbottom, left: this.isRTL ? props.offsetright : props.offsetleft, right: this.isRTL ? props.offsetleft : props.offsetright }}>\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n {\n props.viewtype === 'Stacked' ? <VictoryStack \n colorScale={!this.theme ? this.state.colors : undefined}>\n {\n this.getBarChart(props)\n }\n </VictoryStack> : <VictoryGroup colorScale={!this.theme ? this.state.colors : undefined} offset={10} >\n {\n this.getBarChart(props) \n }\n </VictoryGroup>\n }\n </VictoryChart></View></View>);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAA2B,cAAc;AACtE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SACEC,YAAY,EACZC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AAGxB,KAAK,CAACoH,UAAU,GAAGpH,KAAK,CAACmH;MAAY;IAAE,GACpM,IAAI,CAACG,aAAa,CAAC,CAAC,EACpB,IAAI,CAACC,QAAQ,CAAC,CAAC,EACf,IAAI,CAACC,QAAQ,CAAC,CAAC,EAEdxH,KAAK,CAACyH,QAAQ,KAAK,SAAS,gBAAG3I,KAAA,CAAAiC,aAAA,CAACzB,YAAY;MAC5CoI,UAAU,EAAE,CAAC,IAAI,CAAClB,KAAK,GAAG,IAAI,CAAC9F,KAAK,CAACqB,MAAM,GAAGR;IAAU,GAEpD,IAAI,CAACjB,WAAW,CAACN,KAAK,CAEZ,CAAC,gBAAGlB,KAAA,CAAAiC,aAAA,CAACxB,YAAY;MAACmI,UAAU,EAAE,CAAC,IAAI,CAAClB,KAAK,GAAG,IAAI,CAAC9F,KAAK,CAACqB,MAAM,GAAGR,SAAU;MAAEoG,MAAM,EAAE;IAAG,GAEjG,IAAI,CAACrH,WAAW,CAACN,KAAK,CAEZ,CAEJ,CAAO,CAAO,CAAC;EAC/B;AACF","ignoreList":[]}
@@ -9,7 +9,6 @@ export default class WmBarChartProps extends BaseChartComponentProps {
9
9
  _defineProperty(this, "viewtype", 'Grouped');
10
10
  _defineProperty(this, "onSelect", void 0);
11
11
  _defineProperty(this, "barwidth", void 0);
12
- _defineProperty(this, "showzerothvalue", false);
13
12
  }
14
13
  }
15
14
  //# sourceMappingURL=bar-chart.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseChartComponentProps","WmBarChartProps","constructor","args","_defineProperty"],"sources":["bar-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from \"@wavemaker/app-rn-runtime/components/chart/basechart.props\";\n\nexport default class WmBarChartProps extends BaseChartComponentProps {\n horizontal?: boolean = true;\n viewtype: string = 'Grouped';\n onSelect?: any;\n barwidth?: number;\n showzerothvalue: boolean = false;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,eAAe,SAASD,uBAAuB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBAC5C,IAAI;IAAAA,eAAA,mBACR,SAAS;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,0BAGD,KAAK;EAAA;AAClC","ignoreList":[]}
1
+ {"version":3,"names":["BaseChartComponentProps","WmBarChartProps","constructor","args","_defineProperty"],"sources":["bar-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from \"@wavemaker/app-rn-runtime/components/chart/basechart.props\";\n\nexport default class WmBarChartProps extends BaseChartComponentProps {\n horizontal?: boolean = true;\n viewtype: string = 'Grouped';\n onSelect?: any;\n barwidth?: number;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,4DAA4D;AAEhG,eAAe,MAAMC,eAAe,SAASD,uBAAuB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,qBAC5C,IAAI;IAAAA,eAAA,mBACR,SAAS;IAAAA,eAAA;IAAAA,eAAA;EAAA;AAG9B","ignoreList":[]}
@@ -107,14 +107,14 @@ export class BaseChartComponent extends BaseComponent {
107
107
  // format number and add suffix
108
108
  return scaled.toFixed(1) + suffix;
109
109
  }
110
- getLegendView(colorScale, offset = 0) {
110
+ getLegendView(colorScale) {
111
111
  if (this.state.props.showlegend === 'hide') {
112
112
  return null;
113
113
  }
114
114
  const props = this.state.props;
115
115
  let top = props.showlegend === 'bottom' ? parseInt(this.styles.root.height) : 0;
116
116
  if (top) {
117
- top = offset !== 0 ? top - 50 : top - offset; // remove legendHeight
117
+ top = top - 50; // remove legendHeight
118
118
  }
119
119
  const orientation = props.showlegend === 'right' || props.showlegend === 'left' ? 'vertical' : 'horizontal';
120
120
  return /*#__PURE__*/React.createElement(VictoryLegend, {
@@ -129,7 +129,7 @@ export class BaseChartComponent extends BaseComponent {
129
129
  }
130
130
  },
131
131
  borderPadding: {
132
- top: offset !== 0 ? 0 : 30,
132
+ top: 30,
133
133
  left: 50
134
134
  },
135
135
  y: top
@@ -162,17 +162,16 @@ export class BaseChartComponent extends BaseComponent {
162
162
  }
163
163
 
164
164
  // x axis with vertical lines having grid stroke colors
165
- getXaxis(offset = 0) {
166
- var _props$chartheight;
165
+ getXaxis() {
167
166
  const minIndex = 0;
168
167
  const maxIndex = this.state.xaxisDatakeyArr.length - 1;
169
168
  const props = this.state.props;
170
169
  const getTickValueLabel = props.xtickexpr;
171
- let height = (_props$chartheight = props.chartheight) !== null && _props$chartheight !== void 0 ? _props$chartheight : this.styles.root.height || 250;
170
+ let height = this.styles.root.height || 250;
171
+ let yaxislabeldistance = props.yaxislabeldistance ? props.yaxislabeldistance : height - 20;
172
172
  if (height && typeof height === 'string') {
173
173
  height = parseInt(height);
174
174
  }
175
- let yaxislabeldistance = props.yaxislabeldistance ? props.yaxislabeldistance : height + offset - 20;
176
175
  return /*#__PURE__*/React.createElement(VictoryAxis, {
177
176
  crossAxis: false,
178
177
  label: (props.xaxislabel || props.xaxisdatakey || "name") + (props.xunits ? `(${props.xunits})` : ''),
@@ -194,7 +193,7 @@ export class BaseChartComponent extends BaseComponent {
194
193
  y: yaxislabeldistance
195
194
  }),
196
195
  tickLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, {
197
- y: props.offsetyaxis ? props.offsetyaxis : height + offset - 30,
196
+ y: props.offsetyaxis ? props.offsetyaxis : height - 30,
198
197
  angle: props.labelangle || 0
199
198
  }),
200
199
  theme: this.state.theme,
@@ -575,6 +574,14 @@ export class BaseChartComponent extends BaseComponent {
575
574
  });
576
575
  // chartTransform
577
576
  this.invokeEventCallback('onTransform', [undefined, this.proxy]);
577
+ if (props.type == 'Pie' || props.type === 'Donut') {
578
+ // for animation effect
579
+ setTimeout(() => {
580
+ this.updateState({
581
+ endAngle: 360
582
+ });
583
+ }, 500);
584
+ }
578
585
  this.updateData(datasets, yPts, xaxisDatakeyArr);
579
586
  }
580
587
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Dimensions","View","Text","moment","forEach","get","isArray","isEmpty","isObject","maxBy","minBy","set","orderBy","VictoryAxis","VictoryLegend","VictoryLabel","BaseComponent","BaseComponentState","WmIcon","ThemeFactory","DEFAULT_CLASS","constructSampleData","getChartType","WmLottie","BaseChartComponentState","constructor","args","_defineProperty","undefined","screenWidth","width","shapes","SI_SYMBOL","BaseChartComponent","props","defaultClass","defaultProps","defaultState","e","viewWidth","nativeEvent","layout","viewHeight","height","handleLayout","state","chartWidth","updateState","Number","totalHeight","viewRef","createRef","theme","applyTheme","subscribe","event","isTooltipOpen","componentDidMount","abbreviateNumber","number","tier","Math","log10","abs","suffix","scale","pow","scaled","toFixed","getLegendView","colorScale","offset","showlegend","top","parseInt","styles","root","orientation","createElement","name","gutter","data","legendData","style","border","stroke","borderPadding","left","y","getYScaleMinValue","value","_min","floor","setYAxisFormat","yVal","ynumberformat","matchFixed","match","matchExponential","toExponential","toLocaleString","getXaxis","_props$chartheight","minIndex","maxIndex","xaxisDatakeyArr","length","getTickValueLabel","xtickexpr","chartheight","yaxislabeldistance","crossAxis","label","xaxislabel","xaxisdatakey","xunits","axisLabel","mergeStyle","yAxisLabel","grid","hidegridxaxis","xGrid","axis","showxaxis","xAxis","ticks","xTicks","tickLabels","showxaxislabels","fill","xTickLabels","fixLabelOverlap","autoadjustlabels","axisLabelComponent","tickLabelComponent","offsetyaxis","angle","labelangle","tickCount","invertAxis","isRTL","tickFormat","d","i","getYAxis","showyaxis","ytickexpr","xaxislabeldistance","yaxislabel","yaxisdatakey","yunits","hidegridyaxis","yGrid","yAxis","yTicks","showyaxislabels","yTickLabels","x","offsetxaxis","dependentAxis","setTooltipTemplate","partialName","template","setTooltipPartialLayout","tooltipLayout","tooltipoffsetx","tooltipoffsety","renderPointer","transform","rotate","bottom","tooltipPointer","borderBottomWidth","getTooltip","tooltips","yAxisData","tooltipYaxis","renderitempartial","onLayout","bind","position","tooltipYPosition","tooltipXPosition","zIndex","selectedItem","index","right","tooltipContainer","fontSize","fontWeight","tooltipXText","tooltipXaxis","isAxisDomainSupported","type","isAxisDomainValid","areMinMaxValuesValid","values","isFinite","min","max","setDomainValues","xDomainValues","yDomainValues","getXMinMaxValues","getYMinMaxValues","chartMinX","chartMaxX","yMin","chartMinY","chartMaxY","datum","xValues","dataObject","yValues","minValues","maxValues","push","setHeightWidthOnChart","cb","chartHeight","themeName","colorsToUse","customcolors","trim","split","map","color","filter","Array","themeToUse","getColorsObj","getTheme","colors","prepareLegendData","ldata","prepareEvents","_","idx","childName","target","eventKey","String","eventHandlers","onClick","mutation","onMouseOver","onMouseOut","getxAxisVal","dataObj","xKey","isValid","isNaN","replace","prepareDataItems","dataset","xaxis","yaxis","datasets","_yaxis","shape","yPts","o","xindex","xVal","parseFloat","bubblesize","invokeEventCallback","proxy","updateData","renderLoadingIcon","id","getTestId","loadingIcon","iconclass","loadingicon","caption","loadingdatamsg","labeltype","setTotal","ydomain","xdomain","loading","total","onPropertyChange","$new","$old","units","xLabel","yLabel","renderSkeleton","skeletonanimationresource","_this$styles","_this$styles2","_this$styles3","content","skeleton","source","loop","autoplay","speed","skeletonanimationspeed","getDataType","widgetContext","Error"],"sources":["basechart.component.tsx"],"sourcesContent":["import React from \"react\";\nimport { Dimensions, View, Text, LayoutChangeEvent} from 'react-native';\nimport moment from \"moment\";\nimport {forEach, get, isArray, isEmpty, isObject, maxBy, minBy, set, trim, orderBy} from \"lodash-es\";\nimport { ScatterSymbolType } from \"victory-core\";\nimport {VictoryAxis, VictoryLegend, VictoryLabel, VictoryVoronoiContainer, VictoryTooltip} from \"victory-native\";\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\nimport ThemeFactory from \"@wavemaker/app-rn-runtime/components/chart/theme/chart.theme\";\n\nimport BaseChartComponentProps from \"./basechart.props\";\nimport { DEFAULT_CLASS, BaseChartComponentStyles} from \"./basechart.styles\";\nimport _ from \"lodash\";\nimport { constructSampleData, getChartType } from \"./staticdata\";\nimport { isWebPreviewMode } from \"@wavemaker/app-rn-runtime/core/utils\";\nimport WmLottie from \"../basic/lottie/lottie.component\";\n\nexport class BaseChartComponentState <T extends BaseChartComponentProps> extends BaseComponentState<T> {\n data: any = [];\n content: any = null;\n yAxis: Array<string> = [];\n xaxisDatakeyArr: Array<any> = [];\n legendData: any = [];\n theme: any;\n colors: any;\n xLabel: string = '';\n yLabel: string = '';\n total: number = 0;\n endAngle: number = 0;\n loading: boolean = true;\n chartHeight: number = 0;\n chartWidth: number = 0;\n totalHeight: number = 0;\n chartMinY: number | undefined = undefined;\n chartMinX: number | undefined = undefined;\n chartMaxY: number | undefined = undefined;\n chartMaxX: number | undefined = undefined;\n tooltipXPosition = 0;\n tooltipYPosition = 0;\n tooltipXaxis = 0;\n tooltipYaxis = 0;\n tooltipoffsetx: number = 50;\n tooltipoffsety: number = 80;\n isTooltipOpen: boolean = false;\n selectedItem: any = {}\n template: string = \"\";\n}\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\nconst shapes: {[key: string]: any} = {\n 'circle': 'circle',\n 'cross': 'cross',\n 'diamond': 'diamond',\n 'plus': 'plus',\n 'minus': 'minus',\n 'square': 'square',\n 'star': 'star',\n 'triangle-down': 'triangleDown',\n 'triangle-up': 'triangleUp',\n};\n\nconst SI_SYMBOL = [\"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\"];\n\nexport abstract class BaseChartComponent<T extends BaseChartComponentProps, S extends BaseChartComponentState<T>, L extends BaseChartComponentStyles> extends BaseComponent<T, S, L> {\n protected screenWidth: number = screenWidth;\n protected viewRef: React.RefObject<View | null>;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n this.viewRef = React.createRef();\n if (!props.theme) {\n this.applyTheme(props);\n }\n this.subscribe('globaltouch', (event: any) => {\n this.updateState({\n isTooltipOpen: false\n } as any)\n });\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n let viewHeight = e.nativeEvent.layout.height;\n \n this.handleLayout(e)\n \n if (this?.state && viewWidth !== this.state.chartWidth) {\n this.updateState({\n chartWidth: Number(viewWidth),\n totalHeight: Number(viewHeight)\n } as any)\n }\n }\n\n\n abbreviateNumber(number: any) {\n if (typeof number !== 'number') {\n return number;\n }\n const tier = Math.log10(Math.abs(number)) / 3 | 0;\n\n if (tier == 0) {\n return number;\n }\n\n // get suffix and determine scale\n const suffix = SI_SYMBOL[tier];\n const scale = Math.pow(10, tier * 3);\n\n // scale the number\n var scaled = number / scale;\n\n // format number and add suffix\n return scaled.toFixed(1) + suffix;\n }\n\n getLegendView(colorScale?: any, offset: number = 0) {\n if (this.state.props.showlegend === 'hide') {\n return null;\n }\n const props = this.state.props;\n let top = props.showlegend === 'bottom' ? parseInt(this.styles.root.height as string) : 0;\n if (top) {\n top = offset !== 0 ? top - 50 : top - (offset); // remove legendHeight\n }\n const orientation = (props.showlegend === 'right' || props.showlegend === 'left') ? 'vertical' : 'horizontal';\n return <VictoryLegend\n colorScale={colorScale}\n name={'legendData'}\n orientation={orientation}\n gutter={20}\n data={this.state.legendData}\n style={{ border: { stroke: 'none' }, }}\n borderPadding={{top: offset !== 0 ? 0 : 30, left: 50}}\n y={top}\n />\n }\n\n getYScaleMinValue(value: number) {\n const _min = Math.floor(value);\n return Math.abs(value) - _min > 0 ? value - .1 : _min - 1;\n };\n\n setYAxisFormat(yVal: any, ynumberformat: string){\n const matchFixed = ynumberformat.match(/\\.([0-9])f/);\n const matchExponential = ynumberformat.match(/\\.([0-9])g/);\n if (matchFixed) {\n return yVal.toFixed(parseInt(matchFixed[1], 10));\n } else if (matchExponential) {\n return yVal.toExponential(parseInt(matchExponential[1], 10));\n }\n switch (ynumberformat) {\n case '%':\n return (yVal * 100).toFixed(0) + '%';\n case 'Billion':\n return (yVal / 1e9).toFixed(1) + 'B';\n case 'Million':\n return (yVal / 1e6).toFixed(1) + 'M';\n case 'Thousand':\n return (yVal / 1e3).toFixed(1) + 'K';\n case ',r':\n return yVal.toLocaleString();\n }\n }\n\n // x axis with vertical lines having grid stroke colors\n getXaxis(offset: number = 0) {\n const minIndex = 0;\n const maxIndex = this.state.xaxisDatakeyArr.length - 1;\n const props = this.state.props;\n const getTickValueLabel = props.xtickexpr as any;\n let height = props.chartheight ?? (this.styles.root.height || 250);\n if (height && typeof height === 'string') {\n height = parseInt(height);\n }\n let yaxislabeldistance = props.yaxislabeldistance ? props.yaxislabeldistance : height as number + offset - 20;\n \n return <VictoryAxis crossAxis={false} label={(props.xaxislabel || props.xaxisdatakey || \"name\") + (props.xunits ? `(${props.xunits})` : '')}\n style={{\n axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel),\n grid: props.hidegridxaxis ?\n { stroke: null } : this.theme.mergeStyle(this.styles.grid, this.styles.xGrid),\n axis: props.showxaxis === false ?\n { stroke: 'none' } : this.theme.mergeStyle(this.styles.axis, this.styles.xAxis),\n ticks: this.theme.mergeStyle(this.styles.ticks, this.styles.xTicks),\n tickLabels: props.showxaxislabels === false ? {fill: 'none'} : this.theme.mergeStyle(this.styles.tickLabels, this.styles.xTickLabels)\n }}\n fixLabelOverlap= {props.autoadjustlabels?true:false}\n axisLabelComponent={<VictoryLabel \n y={yaxislabeldistance}\n />}\n tickLabelComponent={\n <VictoryLabel \n y={props.offsetyaxis ? props.offsetyaxis : height as number + offset - 30} \n angle={props.labelangle || 0}\n />\n } \n theme={this.state.theme}\n tickCount={this.state.xaxisDatakeyArr.length} \n invertAxis={this.isRTL}\n tickFormat= {(d: number, i: number, ticks: any) => {\n if (getTickValueLabel) {\n return getTickValueLabel(this.state.xaxisDatakeyArr[d], i, (ticks || []).length);\n } else if (this.state.xaxisDatakeyArr) {\n return this.state.xaxisDatakeyArr[d];\n }\n return '';\n }}\n />; \n} \n\n\n /* y axis with horizontal lines having grid stroke colors*/\n getYAxis() {\n const props = this.state.props;\n if (props.showyaxis === false) {\n return null;\n }\n const getTickValueLabel = props.ytickexpr as any;\n const ynumberformat = props.ynumberformat;\n let xaxislabeldistance = props.xaxislabeldistance ? props.xaxislabeldistance : 20\n return <VictoryAxis crossAxis={false} label={(props.yaxislabel || props.yaxisdatakey) + (props.yunits ? `(${props.yunits})` : '')}\n style={{\n axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel),\n grid: props.hidegridyaxis ? { stroke: null } : this.theme.mergeStyle(this.styles.grid, this.styles.yGrid),\n axis: props.showxaxis === false ?\n { stroke: 'none' } : this.theme.mergeStyle(this.styles.axis, this.styles.yAxis),\n ticks: this.theme.mergeStyle(this.styles.ticks, this.styles.yTicks),\n tickLabels: props.showyaxislabels === false ? {fill: 'none'} : this.theme.mergeStyle(this.styles.tickLabels, this.styles.yTickLabels)\n }}\n fixLabelOverlap= {props.autoadjustlabels?true:false}\n axisLabelComponent={<VictoryLabel x={this.isRTL ? (screenWidth - xaxislabeldistance -\n 30) : xaxislabeldistance}/>}\n tickLabelComponent={<VictoryLabel x={this.isRTL ? (props.offsetxaxis ? screenWidth - \n props.offsetxaxis - 30 : screenWidth - 80) : (props.offsetxaxis || 50)} />}\n theme={this.state.theme}\n tickFormat= {(d: number, i: number, ticks: any) => {\n if (getTickValueLabel) {\n return getTickValueLabel(d, i, (ticks || []).length);\n }\n if (ynumberformat) {\n return this.setYAxisFormat(d, ynumberformat);\n }\n return this.abbreviateNumber(d);\n }}\n orientation={this.isRTL?\"right\":\"left\"}\n dependentAxis />;\n }\n \n setTooltipTemplate(partialName: any) {\n this.updateState({ template: partialName} as any);\n }\n\n setTooltipPartialLayout(event: LayoutChangeEvent){\n let tooltipLayout = event.nativeEvent.layout;\n this.updateState({\n tooltipoffsetx: tooltipLayout.width/2,\n tooltipoffsety: tooltipLayout.height\n } as any)\n }\n \n renderPointer(){\n return (\n <View \n style={[\n {\n transform: [\n { rotate: '180deg' }\n ],\n bottom: -10,\n left: this.state.tooltipoffsetx - this.styles.tooltipPointer.borderBottomWidth/2\n },\n this.styles.tooltipPointer\n ]}\n />\n )\n }\n\n getTooltip() {\n if(!this.state.props.tooltips){\n return;\n }\n const ynumberformat = this.state.props.ynumberformat;\n let yAxisData = ynumberformat ? this.setYAxisFormat(this.state.tooltipYaxis, ynumberformat) : this.state.tooltipYaxis;\n return this.state.isTooltipOpen ? (\n !isEmpty(this.state.template) && this.props.renderitempartial ?\n <View onLayout={this.setTooltipPartialLayout.bind(this)} style={{ position: \"absolute\", top: this.state.tooltipYPosition as number, left: this.state.tooltipXPosition as number , zIndex: 99}}>\n {this.props.renderitempartial(this.state.selectedItem, this.state.selectedItem.index, this.state.template)}\n {this.renderPointer()}\n </View> : (\n <View style={[\n { position: \"absolute\", top: this.state.tooltipYPosition as number},this.isRTL ? {right: this.state.tooltipXPosition as number} : {left: this.state.tooltipXPosition as number},\n this.styles.tooltipContainer\n ]}>\n <Text style={[{ fontSize: 16, fontWeight: 'bold' },this.styles.tooltipXText]}>{this.state.tooltipXaxis}</Text>\n <Text style={this.styles.tooltipXText}>{yAxisData}</Text>\n {this.renderPointer()}\n </View>)\n ) : null;\n } \n\n // X/Y Domain properties are supported only for Column and Area charts\n isAxisDomainSupported(type: string) {\n return type === 'Column'|| type === 'Area';\n }\n\n // Check whether X/Y Domain was set to Min and is supported for the present chart\n isAxisDomainValid(axis: string) {\n const props = this.state.props;\n if (get(props, axis + 'domain') === 'Min' && (this.isAxisDomainSupported(props.type))) {\n return true;\n }\n return false;\n };\n\n// Check whether min and max values are finite or not\n areMinMaxValuesValid(values: any) {\n if (isFinite(values.min) && isFinite(values.max)) {\n return true;\n }\n return false;\n };\n\n setDomainValues() {\n let xDomainValues, yDomainValues;\n if (this.state.data.length > 0) {\n if (this.isAxisDomainValid('x') && typeof this.state.data[0].x === 'number') {\n xDomainValues = this.getXMinMaxValues(this.state.data[0]);\n }\n if (this.isAxisDomainValid('y')) {\n yDomainValues = this.getYMinMaxValues(this.state.data);\n }\n if (xDomainValues) {\n this.updateState({\n chartMinX: yDomainValues.min.x,\n chartMaxX: yDomainValues.max.x\n } as S)\n }\n let yMin;\n if (yDomainValues) {\n if (this.areMinMaxValuesValid({max: yDomainValues.max.y, min: yDomainValues.min.y})) {\n yMin = this.getYScaleMinValue(yDomainValues.min.y);\n }\n this.updateState({\n chartMinY: yMin ? yMin : yDomainValues.min.y,\n chartMaxY: yDomainValues.max.y\n } as S);\n }\n }\n }\n\n // Getting the min and max values among all the x values\n getXMinMaxValues(datum: Array<{x: number, y: any}>) {\n if (!datum) {\n return;\n }\n const xValues: any = {};\n /*\n compute the min x valuex\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n min x: 1\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n min x: 10\n */\n xValues.min = minBy(datum, (dataObject: {x: any, y: any}) => dataObject.x) || {x: undefined};\n /*\n compute the max x value\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n max x: 3\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n max x: 30\n */\n xValues.max = maxBy(datum, (dataObject: {x: any, y: any}) => dataObject.x)|| {x: undefined};\n return xValues;\n }\n\n // Getting the min and max values among all the y values\n getYMinMaxValues(datum: Array<Array<{x: any, y: number}>>) {\n const yValues: any = {},\n minValues: any = [],\n maxValues: any = [];\n if (!datum) {\n return;\n }\n\n /*\n Getting the min and max y values among all the series of data\n compute the min y value\n eg: When data has objects\n input: [[{x:1, y:2}, {x:2, y:3}, {x:3, y:4}], [{x:2, y:3}, {x:3, y:4}, {x:4, y:5}]]\n min y values : '2'(among first set) & '3'(among second set)\n max y values : '4'(among first set) & '5'(among second set)\n\n eg: When data has arrays\n input: [[[10, 20], [20, 30], [30, 40]], [[20, 30], [30, 40], [40, 50]]]\n min y values : '20'(among first set) & '30'(among second set)\n max y values : '40'(among first set) & '50'(among second set)\n */\n\n forEach(datum, data => {\n if (data && !isEmpty(data)) {\n minValues.push(minBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n maxValues.push(maxBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n }\n });\n // Gets the least and highest values among all the min and max values of respective series of data\n yValues.min = minBy(minValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n yValues.max = maxBy(maxValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n return yValues;\n }\n\n setHeightWidthOnChart(cb?: () => void) {\n let height = this.styles.root.height || 250;\n let width = this.styles.root.width || screenWidth;\n if (height && typeof height === 'string') {\n height = parseInt(height);\n }\n if (width && typeof width === 'string') {\n width = parseInt(width);\n }\n this.updateState({\n chartHeight: height,\n chartWidth: width\n } as S, cb);\n }\n\n applyTheme(props: BaseChartComponentProps) {\n let themeName = props.theme ? props.theme : (props.type === 'Pie' ? 'Azure' : 'Terrestrial');\n let colorsToUse = [];\n \n if (props.customcolors) {\n if (typeof props.customcolors === 'string' && props.customcolors.trim() !== '') {\n colorsToUse = props.customcolors.split(',').map(color => color.trim()).filter(color => color !== '');\n } else if (Array.isArray(props.customcolors) && props.customcolors.length > 0) {\n colorsToUse = props.customcolors.filter(color => color && typeof color === 'string');\n }\n }\n \n let themeToUse;\n if (typeof themeName === 'string') {\n if (colorsToUse.length === 0) {\n colorsToUse = ThemeFactory.getColorsObj(themeName);\n }\n themeToUse = ThemeFactory.getTheme(themeName, props.styles, colorsToUse);\n } else if (typeof themeName === 'object') {\n // if theme is passed as an object then use that custom theme.\n themeToUse = props.theme;\n }\n this.updateState({\n colors: colorsToUse,\n theme: themeToUse\n } as S);\n }\n\n prepareLegendData() {\n const props = this.state.props;\n if (this.state.yAxis) {\n let ldata: any;\n if (props.type === 'Stack') {\n const data = orderBy(this.state.data[0], 'y', 'asc');\n ldata = data.map((d: any) => {\n return {\n name: this.state.xaxisDatakeyArr[d.x]\n }\n });\n } else {\n ldata = this.state.yAxis.map((d: string) => {\n return {\n name: d\n }\n });\n }\n\n this.updateState({\n legendData: ldata\n } as S);\n }\n }\n\n prepareEvents(name: string) {\n return this.state.legendData.map((_: any, idx: number) => {\n return {\n childName: ['legend'],\n target: 'data',\n eventKey: String(idx),\n eventHandlers: {\n onClick: () => {\n return [\n {\n childName: [name + '_' + idx],\n target: 'data',\n eventKey: 'all',\n mutation: (props: any) => {\n return null;\n }\n }\n ];\n },\n onMouseOver: () => {\n },\n onMouseOut: () => {\n }\n }\n };\n });\n }\n\n // If date string is bound to xaxis then we are pushing the x values as indexes.\n getxAxisVal(dataObj: {[key: string] : any}, xKey: string, index: number, xaxisDatakeyArr: Array<any>) {\n const value: any = get(dataObj, xKey);\n if (moment(value).isValid() || isNaN(value) || typeof value === 'string' || typeof value === 'number') {\n if (typeof value === \"string\"){\n xaxisDatakeyArr.push(value.replace(\"\\\\n\",\"\\n\"));\n }\n else{\n xaxisDatakeyArr.push(value);\n }\n return index;\n }\n return value;\n }\n\n prepareDataItems(dataset: any) {\n const props = this.state.props;\n let xaxis = props.xaxisdatakey;\n let yaxis = props.yaxisdatakey;\n let xaxisDatakeyArr: Array<any> = [];\n let datasets: any = [];\n if (dataset.length === 0) {\n dataset = constructSampleData(getChartType(this.props), yaxis?.split(','), this.props.shape);\n xaxis = \"x\";\n yaxis = \"y\";\n }\n if (xaxis && yaxis) {\n let yPts = yaxis.split(',');\n yPts.forEach((y: any) => {\n if (xaxis !== y) {\n datasets.push(dataset.map((o: {[key: string] : any}, xindex: number) => {\n const xVal = this.getxAxisVal(o, xaxis, xindex, xaxisDatakeyArr);\n let yVal: string | number = get(o, y);\n if (typeof yVal === 'string') {\n yVal = parseFloat(yVal) || yVal;\n }\n let dataObj = {\n x: xVal,\n y: yVal,\n };\n if (props.bubblesize) {\n set(dataObj, 'size', get(o, props.bubblesize, 5));\n }\n if (props.shape) {\n set(dataObj, 'symbol', shapes[props.shape]);\n }\n return dataObj;\n }));\n }\n });\n // chartTransform\n this.invokeEventCallback('onTransform', [undefined, this.proxy]); \n this.updateData(datasets, yPts, xaxisDatakeyArr);\n }\n }\n\n\n protected renderLoadingIcon() {\n const props = this.state.props;\n return (<WmIcon id={this.getTestId('loadericon')} styles={this.styles.loadingIcon}\n iconclass={props.loadingicon}\n caption={props.loadingdatamsg}></WmIcon>);\n }\n\n updateData(datasets: any, yPts: any, xaxisDatakeyArr: Array<any>) {\n const props = this.state.props;\n this.updateState({\n data: datasets as any,\n yAxis: yPts,\n xaxisDatakeyArr: xaxisDatakeyArr\n } as S, () => {\n this.prepareLegendData();\n if (!props.labeltype || props.labeltype === 'percent') {\n this.setTotal(this.state.data[0]);\n }\n if (this.isAxisDomainSupported(props.type) && (props.ydomain || props.xdomain)) {\n this.setDomainValues();\n }\n this.updateState({\n loading: false\n } as S);\n });\n }\n\n setTotal(data: Array<{x: any, y: number}>) {\n let total = 0;\n data.forEach((d: {x: any, y: any}) => {\n total += d.y as number;\n });\n this.updateState({\n total: total\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n let units = '';\n switch(name) {\n case 'customcolors':\n this.applyTheme({...props, customcolors: $new});\n break;\n case 'theme':\n this.applyTheme(props);\n break;\n case 'dataset':\n if (!isArray($new)) {\n if (isObject($new) && !isEmpty($new)) {\n $new = [$new];\n } else {\n $new = [];\n }\n }\n $new && this.prepareDataItems($new);\n break;\n case 'xaxislabel':\n if (props.xunits) {\n units = ' (' + props.xunits + ')';\n }\n this.updateState({\n xLabel: $new + units\n } as S);\n break;\n case 'yaxislabel':\n if (props.yunits) {\n units = ' (' + props.yunits + ')';\n }\n this.updateState({\n yLabel: $new + units\n } as S);\n break;\n }\n }\n\n public renderSkeleton(props: T): React.ReactNode {\n if(props.skeletonanimationresource) {\n return <View style={[{width: '100%'}, this.styles?.root]}>\n <WmLottie styles={{ content: {...this.styles?.root, ...this.styles?.skeleton?.root} }} source={props.skeletonanimationresource} loop={true} autoplay={true} speed={this.props.skeletonanimationspeed}/>\n </View>\n }\n return null;\n }\n}\nfunction getDataType(widgetContext: { yaxisdatakey: string | null | undefined; shape: any; }): any {\n throw new Error(\"Function not implemented.\");\n}\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAA0B,cAAc;AACvE,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAAQC,OAAO,EAAEC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,KAAK,EAAEC,GAAG,EAAQC,OAAO,QAAO,WAAW;AAEpG,SAAQC,WAAW,EAAEC,aAAa,EAAEC,YAAY,QAAgD,gBAAgB;AAEhH,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,YAAY,MAAO,8DAA8D;AAGxF,SAASC,aAAa,QAAiC,oBAAoB;AAE3E,SAASC,mBAAmB,EAAEC,YAAY,QAAQ,cAAc;AAEhE,OAAOC,QAAQ,MAAM,kCAAkC;AAEvD,OAAO,MAAMC,uBAAuB,SAA6CP,kBAAkB,CAAI;EAAAQ,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,eACzF,EAAE;IAAAA,eAAA,kBACC,IAAI;IAAAA,eAAA,gBACI,EAAE;IAAAA,eAAA,0BACK,EAAE;IAAAA,eAAA,qBACd,EAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,iBAGH,EAAE;IAAAA,eAAA,iBACF,EAAE;IAAAA,eAAA,gBACH,CAAC;IAAAA,eAAA,mBACE,CAAC;IAAAA,eAAA,kBACD,IAAI;IAAAA,eAAA,sBACD,CAAC;IAAAA,eAAA,qBACF,CAAC;IAAAA,eAAA,sBACA,CAAC;IAAAA,eAAA,oBACSC,SAAS;IAAAD,eAAA,oBACTC,SAAS;IAAA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,MAAM,cAAA0N,aAAA,gBAAAA,aAAA,GAAXA,aAAA,CAAaE,QAAQ,cAAAF,aAAA,uBAArBA,aAAA,CAAuBzN,IAAI;UAAA;QAAE,CAAE;QAAC4N,MAAM,EAAEtQ,KAAK,CAACgQ,yBAA0B;QAACO,IAAI,EAAE,IAAK;QAACC,QAAQ,EAAE,IAAK;QAACC,KAAK,EAAE,IAAI,CAACzQ,KAAK,CAAC0Q;MAAuB,CAAC,CAClM,CAAC;IACP;IACA,OAAO,IAAI;EACb;AACF;AACA,SAASC,WAAWA,CAACC,aAAuE,EAAO;EACjG,MAAM,IAAIC,KAAK,CAAC,2BAA2B,CAAC;AAC9C","ignoreList":[]}
1
+ {"version":3,"names":["React","Dimensions","View","Text","moment","forEach","get","isArray","isEmpty","isObject","maxBy","minBy","set","orderBy","VictoryAxis","VictoryLegend","VictoryLabel","BaseComponent","BaseComponentState","WmIcon","ThemeFactory","DEFAULT_CLASS","constructSampleData","getChartType","WmLottie","BaseChartComponentState","constructor","args","_defineProperty","undefined","screenWidth","width","shapes","SI_SYMBOL","BaseChartComponent","props","defaultClass","defaultProps","defaultState","e","viewWidth","nativeEvent","layout","viewHeight","height","handleLayout","state","chartWidth","updateState","Number","totalHeight","viewRef","createRef","theme","applyTheme","subscribe","event","isTooltipOpen","componentDidMount","abbreviateNumber","number","tier","Math","log10","abs","suffix","scale","pow","scaled","toFixed","getLegendView","colorScale","showlegend","top","parseInt","styles","root","orientation","createElement","name","gutter","data","legendData","style","border","stroke","borderPadding","left","y","getYScaleMinValue","value","_min","floor","setYAxisFormat","yVal","ynumberformat","matchFixed","match","matchExponential","toExponential","toLocaleString","getXaxis","minIndex","maxIndex","xaxisDatakeyArr","length","getTickValueLabel","xtickexpr","yaxislabeldistance","crossAxis","label","xaxislabel","xaxisdatakey","xunits","axisLabel","mergeStyle","yAxisLabel","grid","hidegridxaxis","xGrid","axis","showxaxis","xAxis","ticks","xTicks","tickLabels","showxaxislabels","fill","xTickLabels","fixLabelOverlap","autoadjustlabels","axisLabelComponent","tickLabelComponent","offsetyaxis","angle","labelangle","tickCount","invertAxis","isRTL","tickFormat","d","i","getYAxis","showyaxis","ytickexpr","xaxislabeldistance","yaxislabel","yaxisdatakey","yunits","hidegridyaxis","yGrid","yAxis","yTicks","showyaxislabels","yTickLabels","x","offsetxaxis","dependentAxis","setTooltipTemplate","partialName","template","setTooltipPartialLayout","tooltipLayout","tooltipoffsetx","tooltipoffsety","renderPointer","transform","rotate","bottom","tooltipPointer","borderBottomWidth","getTooltip","tooltips","yAxisData","tooltipYaxis","renderitempartial","onLayout","bind","position","tooltipYPosition","tooltipXPosition","zIndex","selectedItem","index","right","tooltipContainer","fontSize","fontWeight","tooltipXText","tooltipXaxis","isAxisDomainSupported","type","isAxisDomainValid","areMinMaxValuesValid","values","isFinite","min","max","setDomainValues","xDomainValues","yDomainValues","getXMinMaxValues","getYMinMaxValues","chartMinX","chartMaxX","yMin","chartMinY","chartMaxY","datum","xValues","dataObject","yValues","minValues","maxValues","push","setHeightWidthOnChart","cb","chartHeight","themeName","colorsToUse","customcolors","trim","split","map","color","filter","Array","themeToUse","getColorsObj","getTheme","colors","prepareLegendData","ldata","prepareEvents","_","idx","childName","target","eventKey","String","eventHandlers","onClick","mutation","onMouseOver","onMouseOut","getxAxisVal","dataObj","xKey","isValid","isNaN","replace","prepareDataItems","dataset","xaxis","yaxis","datasets","_yaxis","shape","yPts","o","xindex","xVal","parseFloat","bubblesize","invokeEventCallback","proxy","setTimeout","endAngle","updateData","renderLoadingIcon","id","getTestId","loadingIcon","iconclass","loadingicon","caption","loadingdatamsg","labeltype","setTotal","ydomain","xdomain","loading","total","onPropertyChange","$new","$old","units","xLabel","yLabel","renderSkeleton","skeletonanimationresource","_this$styles","_this$styles2","_this$styles3","content","skeleton","source","loop","autoplay","speed","skeletonanimationspeed","getDataType","widgetContext","Error"],"sources":["basechart.component.tsx"],"sourcesContent":["import React from \"react\";\nimport { Dimensions, View, Text, LayoutChangeEvent} from 'react-native';\nimport moment from \"moment\";\nimport {forEach, get, isArray, isEmpty, isObject, maxBy, minBy, set, trim, orderBy} from \"lodash-es\";\nimport { ScatterSymbolType } from \"victory-core\";\nimport {VictoryAxis, VictoryLegend, VictoryLabel, VictoryVoronoiContainer, VictoryTooltip} from \"victory-native\";\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmIcon from \"@wavemaker/app-rn-runtime/components/basic/icon/icon.component\";\nimport ThemeFactory from \"@wavemaker/app-rn-runtime/components/chart/theme/chart.theme\";\n\nimport BaseChartComponentProps from \"./basechart.props\";\nimport { DEFAULT_CLASS, BaseChartComponentStyles} from \"./basechart.styles\";\nimport _ from \"lodash\";\nimport { constructSampleData, getChartType } from \"./staticdata\";\nimport { isWebPreviewMode } from \"@wavemaker/app-rn-runtime/core/utils\";\nimport WmLottie from \"../basic/lottie/lottie.component\";\n\nexport class BaseChartComponentState <T extends BaseChartComponentProps> extends BaseComponentState<T> {\n data: any = [];\n content: any = null;\n yAxis: Array<string> = [];\n xaxisDatakeyArr: Array<any> = [];\n legendData: any = [];\n theme: any;\n colors: any;\n xLabel: string = '';\n yLabel: string = '';\n total: number = 0;\n endAngle: number = 0;\n loading: boolean = true;\n chartHeight: number = 0;\n chartWidth: number = 0;\n totalHeight: number = 0;\n chartMinY: number | undefined = undefined;\n chartMinX: number | undefined = undefined;\n chartMaxY: number | undefined = undefined;\n chartMaxX: number | undefined = undefined;\n tooltipXPosition = 0;\n tooltipYPosition = 0;\n tooltipXaxis = 0;\n tooltipYaxis = 0;\n tooltipoffsetx: number = 50;\n tooltipoffsety: number = 80;\n isTooltipOpen: boolean = false;\n selectedItem: any = {}\n template: string = \"\";\n}\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\nconst shapes: {[key: string]: any} = {\n 'circle': 'circle',\n 'cross': 'cross',\n 'diamond': 'diamond',\n 'plus': 'plus',\n 'minus': 'minus',\n 'square': 'square',\n 'star': 'star',\n 'triangle-down': 'triangleDown',\n 'triangle-up': 'triangleUp',\n};\n\nconst SI_SYMBOL = [\"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\"];\n\nexport abstract class BaseChartComponent<T extends BaseChartComponentProps, S extends BaseChartComponentState<T>, L extends BaseChartComponentStyles> extends BaseComponent<T, S, L> {\n protected screenWidth: number = screenWidth;\n protected viewRef: React.RefObject<View | null>;\n constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\n this.viewRef = React.createRef();\n if (!props.theme) {\n this.applyTheme(props);\n }\n this.subscribe('globaltouch', (event: any) => {\n this.updateState({\n isTooltipOpen: false\n } as any)\n });\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n let viewHeight = e.nativeEvent.layout.height;\n \n this.handleLayout(e)\n \n if (this?.state && viewWidth !== this.state.chartWidth) {\n this.updateState({\n chartWidth: Number(viewWidth),\n totalHeight: Number(viewHeight)\n } as any)\n }\n }\n\n\n abbreviateNumber(number: any) {\n if (typeof number !== 'number') {\n return number;\n }\n const tier = Math.log10(Math.abs(number)) / 3 | 0;\n\n if (tier == 0) {\n return number;\n }\n\n // get suffix and determine scale\n const suffix = SI_SYMBOL[tier];\n const scale = Math.pow(10, tier * 3);\n\n // scale the number\n var scaled = number / scale;\n\n // format number and add suffix\n return scaled.toFixed(1) + suffix;\n }\n\n getLegendView(colorScale?: any) {\n if (this.state.props.showlegend === 'hide') {\n return null;\n }\n const props = this.state.props;\n let top = props.showlegend === 'bottom' ? parseInt(this.styles.root.height as string) : 0;\n if (top) {\n top = top - (50); // remove legendHeight\n }\n const orientation = (props.showlegend === 'right' || props.showlegend === 'left') ? 'vertical' : 'horizontal';\n return <VictoryLegend\n colorScale={colorScale}\n name={'legendData'}\n orientation={orientation}\n gutter={20}\n data={this.state.legendData}\n style={{ border: { stroke: 'none' } }}\n borderPadding={{top: 30, left: 50}}\n y={top}\n />\n }\n\n getYScaleMinValue(value: number) {\n const _min = Math.floor(value);\n return Math.abs(value) - _min > 0 ? value - .1 : _min - 1;\n };\n\n setYAxisFormat(yVal: any, ynumberformat: string){\n const matchFixed = ynumberformat.match(/\\.([0-9])f/);\n const matchExponential = ynumberformat.match(/\\.([0-9])g/);\n if (matchFixed) {\n return yVal.toFixed(parseInt(matchFixed[1], 10));\n } else if (matchExponential) {\n return yVal.toExponential(parseInt(matchExponential[1], 10));\n }\n switch (ynumberformat) {\n case '%':\n return (yVal * 100).toFixed(0) + '%';\n case 'Billion':\n return (yVal / 1e9).toFixed(1) + 'B';\n case 'Million':\n return (yVal / 1e6).toFixed(1) + 'M';\n case 'Thousand':\n return (yVal / 1e3).toFixed(1) + 'K';\n case ',r':\n return yVal.toLocaleString();\n }\n }\n\n // x axis with vertical lines having grid stroke colors\n getXaxis() {\n const minIndex = 0;\n const maxIndex = this.state.xaxisDatakeyArr.length - 1;\n const props = this.state.props;\n const getTickValueLabel = props.xtickexpr as any;\n let height = this.styles.root.height || 250;\n let yaxislabeldistance = props.yaxislabeldistance ? props.yaxislabeldistance : height as number - 20;\n if (height && typeof height === 'string') {\n height = parseInt(height);\n }\n return <VictoryAxis crossAxis={false} label={(props.xaxislabel || props.xaxisdatakey || \"name\") + (props.xunits ? `(${props.xunits})` : '')}\n style={{\n axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel),\n grid: props.hidegridxaxis ?\n { stroke: null } : this.theme.mergeStyle(this.styles.grid, this.styles.xGrid),\n axis: props.showxaxis === false ?\n { stroke: 'none' } : this.theme.mergeStyle(this.styles.axis, this.styles.xAxis),\n ticks: this.theme.mergeStyle(this.styles.ticks, this.styles.xTicks),\n tickLabels: props.showxaxislabels === false ? {fill: 'none'} : this.theme.mergeStyle(this.styles.tickLabels, this.styles.xTickLabels)\n }}\n fixLabelOverlap= {props.autoadjustlabels?true:false}\n axisLabelComponent={<VictoryLabel y={yaxislabeldistance}/>}\n tickLabelComponent={<VictoryLabel y={props.offsetyaxis ? props.offsetyaxis : height as number - 30} angle={props.labelangle || 0}/>} theme={this.state.theme}\n tickCount={this.state.xaxisDatakeyArr.length} \n invertAxis={this.isRTL}\n tickFormat= {(d: number, i: number, ticks: any) => {\n if (getTickValueLabel) {\n return getTickValueLabel(this.state.xaxisDatakeyArr[d], i, (ticks || []).length);\n } else if (this.state.xaxisDatakeyArr) {\n return this.state.xaxisDatakeyArr[d];\n }\n return '';\n }}\n />; \n} \n\n\n /* y axis with horizontal lines having grid stroke colors*/\n getYAxis() {\n const props = this.state.props;\n if (props.showyaxis === false) {\n return null;\n }\n const getTickValueLabel = props.ytickexpr as any;\n const ynumberformat = props.ynumberformat;\n let xaxislabeldistance = props.xaxislabeldistance ? props.xaxislabeldistance : 20\n return <VictoryAxis crossAxis={false} label={(props.yaxislabel || props.yaxisdatakey) + (props.yunits ? `(${props.yunits})` : '')}\n style={{\n axisLabel: this.theme.mergeStyle(this.styles.axisLabel, this.styles.yAxisLabel),\n grid: props.hidegridyaxis ? { stroke: null } : this.theme.mergeStyle(this.styles.grid, this.styles.yGrid),\n axis: props.showxaxis === false ?\n { stroke: 'none' } : this.theme.mergeStyle(this.styles.axis, this.styles.yAxis),\n ticks: this.theme.mergeStyle(this.styles.ticks, this.styles.yTicks),\n tickLabels: props.showyaxislabels === false ? {fill: 'none'} : this.theme.mergeStyle(this.styles.tickLabels, this.styles.yTickLabels)\n }}\n fixLabelOverlap= {props.autoadjustlabels?true:false}\n axisLabelComponent={<VictoryLabel x={this.isRTL ? (screenWidth - xaxislabeldistance -\n 30) : xaxislabeldistance}/>}\n tickLabelComponent={<VictoryLabel x={this.isRTL ? (props.offsetxaxis ? screenWidth - \n props.offsetxaxis - 30 : screenWidth - 80) : (props.offsetxaxis || 50)} />}\n theme={this.state.theme}\n tickFormat= {(d: number, i: number, ticks: any) => {\n if (getTickValueLabel) {\n return getTickValueLabel(d, i, (ticks || []).length);\n }\n if (ynumberformat) {\n return this.setYAxisFormat(d, ynumberformat);\n }\n return this.abbreviateNumber(d);\n }}\n orientation={this.isRTL?\"right\":\"left\"}\n dependentAxis />;\n }\n \n setTooltipTemplate(partialName: any) {\n this.updateState({ template: partialName} as any);\n }\n\n setTooltipPartialLayout(event: LayoutChangeEvent){\n let tooltipLayout = event.nativeEvent.layout;\n this.updateState({\n tooltipoffsetx: tooltipLayout.width/2,\n tooltipoffsety: tooltipLayout.height\n } as any)\n }\n \n renderPointer(){\n return (\n <View \n style={[\n {\n transform: [\n { rotate: '180deg' }\n ],\n bottom: -10,\n left: this.state.tooltipoffsetx - this.styles.tooltipPointer.borderBottomWidth/2\n },\n this.styles.tooltipPointer\n ]}\n />\n )\n }\n\n getTooltip() {\n if(!this.state.props.tooltips){\n return;\n }\n const ynumberformat = this.state.props.ynumberformat;\n let yAxisData = ynumberformat ? this.setYAxisFormat(this.state.tooltipYaxis, ynumberformat) : this.state.tooltipYaxis;\n return this.state.isTooltipOpen ? (\n !isEmpty(this.state.template) && this.props.renderitempartial ?\n <View onLayout={this.setTooltipPartialLayout.bind(this)} style={{ position: \"absolute\", top: this.state.tooltipYPosition as number, left: this.state.tooltipXPosition as number , zIndex: 99}}>\n {this.props.renderitempartial(this.state.selectedItem, this.state.selectedItem.index, this.state.template)}\n {this.renderPointer()}\n </View> : (\n <View style={[\n { position: \"absolute\", top: this.state.tooltipYPosition as number},this.isRTL ? {right: this.state.tooltipXPosition as number} : {left: this.state.tooltipXPosition as number},\n this.styles.tooltipContainer\n ]}>\n <Text style={[{ fontSize: 16, fontWeight: 'bold' },this.styles.tooltipXText]}>{this.state.tooltipXaxis}</Text>\n <Text style={this.styles.tooltipXText}>{yAxisData}</Text>\n {this.renderPointer()}\n </View>)\n ) : null;\n } \n\n // X/Y Domain properties are supported only for Column and Area charts\n isAxisDomainSupported(type: string) {\n return type === 'Column'|| type === 'Area';\n }\n\n // Check whether X/Y Domain was set to Min and is supported for the present chart\n isAxisDomainValid(axis: string) {\n const props = this.state.props;\n if (get(props, axis + 'domain') === 'Min' && (this.isAxisDomainSupported(props.type))) {\n return true;\n }\n return false;\n };\n\n// Check whether min and max values are finite or not\n areMinMaxValuesValid(values: any) {\n if (isFinite(values.min) && isFinite(values.max)) {\n return true;\n }\n return false;\n };\n\n setDomainValues() {\n let xDomainValues, yDomainValues;\n if (this.state.data.length > 0) {\n if (this.isAxisDomainValid('x') && typeof this.state.data[0].x === 'number') {\n xDomainValues = this.getXMinMaxValues(this.state.data[0]);\n }\n if (this.isAxisDomainValid('y')) {\n yDomainValues = this.getYMinMaxValues(this.state.data);\n }\n if (xDomainValues) {\n this.updateState({\n chartMinX: yDomainValues.min.x,\n chartMaxX: yDomainValues.max.x\n } as S)\n }\n let yMin;\n if (yDomainValues) {\n if (this.areMinMaxValuesValid({max: yDomainValues.max.y, min: yDomainValues.min.y})) {\n yMin = this.getYScaleMinValue(yDomainValues.min.y);\n }\n this.updateState({\n chartMinY: yMin ? yMin : yDomainValues.min.y,\n chartMaxY: yDomainValues.max.y\n } as S);\n }\n }\n }\n\n // Getting the min and max values among all the x values\n getXMinMaxValues(datum: Array<{x: number, y: any}>) {\n if (!datum) {\n return;\n }\n const xValues: any = {};\n /*\n compute the min x valuex\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n min x: 1\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n min x: 10\n */\n xValues.min = minBy(datum, (dataObject: {x: any, y: any}) => dataObject.x) || {x: undefined};\n /*\n compute the max x value\n eg: When data has objects\n input: [{x:1, y:2}, {x:2, y:3}, {x:3, y:4}]\n max x: 3\n eg: When data has arrays\n input: [[10, 20], [20, 30], [30, 40]];\n max x: 30\n */\n xValues.max = maxBy(datum, (dataObject: {x: any, y: any}) => dataObject.x)|| {x: undefined};\n return xValues;\n }\n\n // Getting the min and max values among all the y values\n getYMinMaxValues(datum: Array<Array<{x: any, y: number}>>) {\n const yValues: any = {},\n minValues: any = [],\n maxValues: any = [];\n if (!datum) {\n return;\n }\n\n /*\n Getting the min and max y values among all the series of data\n compute the min y value\n eg: When data has objects\n input: [[{x:1, y:2}, {x:2, y:3}, {x:3, y:4}], [{x:2, y:3}, {x:3, y:4}, {x:4, y:5}]]\n min y values : '2'(among first set) & '3'(among second set)\n max y values : '4'(among first set) & '5'(among second set)\n\n eg: When data has arrays\n input: [[[10, 20], [20, 30], [30, 40]], [[20, 30], [30, 40], [40, 50]]]\n min y values : '20'(among first set) & '30'(among second set)\n max y values : '40'(among first set) & '50'(among second set)\n */\n\n forEach(datum, data => {\n if (data && !isEmpty(data)) {\n minValues.push(minBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n maxValues.push(maxBy(data, (dataObject: {x: any, y: any}) => { return dataObject.y }));\n }\n });\n // Gets the least and highest values among all the min and max values of respective series of data\n yValues.min = minBy(minValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n yValues.max = maxBy(maxValues, (dataObject: {x: any, y: any}) => dataObject.y) || {y: undefined};\n return yValues;\n }\n\n setHeightWidthOnChart(cb?: () => void) {\n let height = this.styles.root.height || 250;\n let width = this.styles.root.width || screenWidth;\n if (height && typeof height === 'string') {\n height = parseInt(height);\n }\n if (width && typeof width === 'string') {\n width = parseInt(width);\n }\n this.updateState({\n chartHeight: height,\n chartWidth: width\n } as S, cb);\n }\n\n applyTheme(props: BaseChartComponentProps) {\n let themeName = props.theme ? props.theme : (props.type === 'Pie' ? 'Azure' : 'Terrestrial');\n let colorsToUse = [];\n \n if (props.customcolors) {\n if (typeof props.customcolors === 'string' && props.customcolors.trim() !== '') {\n colorsToUse = props.customcolors.split(',').map(color => color.trim()).filter(color => color !== '');\n } else if (Array.isArray(props.customcolors) && props.customcolors.length > 0) {\n colorsToUse = props.customcolors.filter(color => color && typeof color === 'string');\n }\n }\n \n let themeToUse;\n if (typeof themeName === 'string') {\n if (colorsToUse.length === 0) {\n colorsToUse = ThemeFactory.getColorsObj(themeName);\n }\n themeToUse = ThemeFactory.getTheme(themeName, props.styles, colorsToUse);\n } else if (typeof themeName === 'object') {\n // if theme is passed as an object then use that custom theme.\n themeToUse = props.theme;\n }\n this.updateState({\n colors: colorsToUse,\n theme: themeToUse\n } as S);\n }\n\n prepareLegendData() {\n const props = this.state.props;\n if (this.state.yAxis) {\n let ldata: any;\n if (props.type === 'Stack') {\n const data = orderBy(this.state.data[0], 'y', 'asc');\n ldata = data.map((d: any) => {\n return {\n name: this.state.xaxisDatakeyArr[d.x]\n }\n });\n } else {\n ldata = this.state.yAxis.map((d: string) => {\n return {\n name: d\n }\n });\n }\n\n this.updateState({\n legendData: ldata\n } as S);\n }\n }\n\n prepareEvents(name: string) {\n return this.state.legendData.map((_: any, idx: number) => {\n return {\n childName: ['legend'],\n target: 'data',\n eventKey: String(idx),\n eventHandlers: {\n onClick: () => {\n return [\n {\n childName: [name + '_' + idx],\n target: 'data',\n eventKey: 'all',\n mutation: (props: any) => {\n return null;\n }\n }\n ];\n },\n onMouseOver: () => {\n },\n onMouseOut: () => {\n }\n }\n };\n });\n }\n\n // If date string is bound to xaxis then we are pushing the x values as indexes.\n getxAxisVal(dataObj: {[key: string] : any}, xKey: string, index: number, xaxisDatakeyArr: Array<any>) {\n const value: any = get(dataObj, xKey);\n if (moment(value).isValid() || isNaN(value) || typeof value === 'string' || typeof value === 'number') {\n if (typeof value === \"string\"){\n xaxisDatakeyArr.push(value.replace(\"\\\\n\",\"\\n\"));\n }\n else{\n xaxisDatakeyArr.push(value);\n }\n return index;\n }\n return value;\n }\n\n prepareDataItems(dataset: any) {\n const props = this.state.props;\n let xaxis = props.xaxisdatakey;\n let yaxis = props.yaxisdatakey;\n let xaxisDatakeyArr: Array<any> = [];\n let datasets: any = [];\n if (dataset.length === 0) {\n dataset = constructSampleData(getChartType(this.props), yaxis?.split(','), this.props.shape);\n xaxis = \"x\";\n yaxis = \"y\";\n }\n if (xaxis && yaxis) {\n let yPts = yaxis.split(',');\n yPts.forEach((y: any) => {\n if (xaxis !== y) {\n datasets.push(dataset.map((o: {[key: string] : any}, xindex: number) => {\n const xVal = this.getxAxisVal(o, xaxis, xindex, xaxisDatakeyArr);\n let yVal: string | number = get(o, y);\n if (typeof yVal === 'string') {\n yVal = parseFloat(yVal) || yVal;\n }\n let dataObj = {\n x: xVal,\n y: yVal,\n };\n if (props.bubblesize) {\n set(dataObj, 'size', get(o, props.bubblesize, 5));\n }\n if (props.shape) {\n set(dataObj, 'symbol', shapes[props.shape]);\n }\n return dataObj;\n }));\n }\n });\n // chartTransform\n this.invokeEventCallback('onTransform', [undefined, this.proxy]);\n if (props.type == 'Pie' || props.type === 'Donut') {\n // for animation effect\n setTimeout(() => {\n this.updateState({\n endAngle: 360,\n } as S);\n }, 500);\n }\n this.updateData(datasets, yPts, xaxisDatakeyArr);\n }\n }\n\n\n protected renderLoadingIcon() {\n const props = this.state.props;\n return (<WmIcon id={this.getTestId('loadericon')} styles={this.styles.loadingIcon}\n iconclass={props.loadingicon}\n caption={props.loadingdatamsg}></WmIcon>);\n }\n\n updateData(datasets: any, yPts: any, xaxisDatakeyArr: Array<any>) {\n const props = this.state.props;\n this.updateState({\n data: datasets as any,\n yAxis: yPts,\n xaxisDatakeyArr: xaxisDatakeyArr\n } as S, () => {\n this.prepareLegendData();\n if (!props.labeltype || props.labeltype === 'percent') {\n this.setTotal(this.state.data[0]);\n }\n if (this.isAxisDomainSupported(props.type) && (props.ydomain || props.xdomain)) {\n this.setDomainValues();\n }\n this.updateState({\n loading: false\n } as S);\n });\n }\n\n setTotal(data: Array<{x: any, y: number}>) {\n let total = 0;\n data.forEach((d: {x: any, y: any}) => {\n total += d.y as number;\n });\n this.updateState({\n total: total\n } as S);\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n super.onPropertyChange(name, $new, $old);\n const props = this.state.props;\n let units = '';\n switch(name) {\n case 'customcolors':\n this.applyTheme({...props, customcolors: $new});\n break;\n case 'theme':\n this.applyTheme(props);\n break;\n case 'dataset':\n if (!isArray($new)) {\n if (isObject($new) && !isEmpty($new)) {\n $new = [$new];\n } else {\n $new = [];\n }\n }\n $new && this.prepareDataItems($new);\n break;\n case 'xaxislabel':\n if (props.xunits) {\n units = ' (' + props.xunits + ')';\n }\n this.updateState({\n xLabel: $new + units\n } as S);\n break;\n case 'yaxislabel':\n if (props.yunits) {\n units = ' (' + props.yunits + ')';\n }\n this.updateState({\n yLabel: $new + units\n } as S);\n break;\n }\n }\n\n public renderSkeleton(props: T): React.ReactNode {\n if(props.skeletonanimationresource) {\n return <View style={[{width: '100%'}, this.styles?.root]}>\n <WmLottie styles={{ content: {...this.styles?.root, ...this.styles?.skeleton?.root} }} source={props.skeletonanimationresource} loop={true} autoplay={true} speed={this.props.skeletonanimationspeed}/>\n </View>\n }\n return null;\n }\n}\nfunction getDataType(widgetContext: { yaxisdatakey: string | null | undefined; shape: any; }): any {\n throw new Error(\"Function not implemented.\");\n}\n\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAA0B,cAAc;AACvE,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAAQC,OAAO,EAAEC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,KAAK,EAAEC,GAAG,EAAQC,OAAO,QAAO,WAAW;AAEpG,SAAQC,WAAW,EAAEC,aAAa,EAAEC,YAAY,QAAgD,gBAAgB;AAEhH,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAOC,MAAM,MAAM,gEAAgE;AACnF,OAAOC,YAAY,MAAO,8DAA8D;AAGxF,SAASC,aAAa,QAAiC,oBAAoB;AAE3E,SAASC,mBAAmB,EAAEC,YAAY,QAAQ,cAAc;AAEhE,OAAOC,QAAQ,MAAM,kCAAkC;AAEvD,OAAO,MAAMC,uBAAuB,SAA6CP,kBAAkB,CAAI;EAAAQ,YAAA,GAAAC,IAAA;IAA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oBAAOrS,KAAA,CAAA8E,aAAA,CAAC5E,IAAI;QAACiF,KAAK,EAAE,CAAC;UAACpD,KAAK,EAAE;QAAM,CAAC,GAAAoQ,YAAA,GAAE,IAAI,CAACxN,MAAM,cAAAwN,YAAA,uBAAXA,YAAA,CAAavN,IAAI;MAAE,gBACzD5E,KAAA,CAAA8E,aAAA,CAACtD,QAAQ;QAACmD,MAAM,EAAE;UAAE2N,OAAO,EAAE;YAAC,KAAAF,aAAA,GAAG,IAAI,CAACzN,MAAM,cAAAyN,aAAA,uBAAXA,aAAA,CAAaxN,IAAI;YAAE,KAAAyN,aAAA,GAAG,IAAI,CAAC1N,MAAM,cAAA0N,aAAA,gBAAAA,aAAA,GAAXA,aAAA,CAAaE,QAAQ,cAAAF,aAAA,uBAArBA,aAAA,CAAuBzN,IAAI;UAAA;QAAE,CAAE;QAAC4N,MAAM,EAAErQ,KAAK,CAAC+P,yBAA0B;QAACO,IAAI,EAAE,IAAK;QAACC,QAAQ,EAAE,IAAK;QAACC,KAAK,EAAE,IAAI,CAACxQ,KAAK,CAACyQ;MAAuB,CAAC,CAClM,CAAC;IACP;IACA,OAAO,IAAI;EACb;AACF;AACA,SAASC,WAAWA,CAACC,aAAuE,EAAO;EACjG,MAAM,IAAIC,KAAK,CAAC,2BAA2B,CAAC;AAC9C","ignoreList":[]}
@@ -59,7 +59,6 @@ export default class BaseChartComponentProps extends SkeletonAnimationProps {
59
59
  _defineProperty(this, "ynumberformat", '');
60
60
  _defineProperty(this, "showxaxislabels", true);
61
61
  _defineProperty(this, "showyaxislabels", true);
62
- _defineProperty(this, "chartheight", void 0);
63
62
  }
64
63
  }
65
64
  //# sourceMappingURL=basechart.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SkeletonAnimationProps","BaseChartComponentProps","constructor","args","_defineProperty","undefined"],"sources":["basechart.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SkeletonAnimationProps } from '@wavemaker/app-rn-runtime/runtime/base-fragment.component';\nimport { AccessibilityRole } from 'react-native';\n\nexport default class BaseChartComponentProps extends SkeletonAnimationProps {\n xaxisdatakey: string = '';\n yaxisdatakey: string = '';\n iconclass = '';\n dataset: any;\n type: string = '';\n title: string = '';\n subheading: string = '';\n theme: string = '';\n xaxislabel: string = '';\n xunits: string = '';\n staggerlabels: boolean = false;\n yaxislabel: string = '';\n yunits: string = '';\n yaxislabeldistance?: number = undefined;\n xaxislabeldistance?: number = undefined;\n offsetxaxis?: number = undefined;\n offsetyaxis?: number = undefined;\n customcolors: string | Array<string> = '';\n legendheight: number = 0;\n labellegendheight: number = 0;\n labeltype: 'percent' | 'value' | 'key-value' | 'key' = 'percent';\n bubblesize: string= '';\n shape: string = '';\n loadingicon='fa fa-circle-o-notch fa-pulse';\n loadingdatamsg = 'Loading...';\n nodatamessage = 'No data found';\n offsetbottom: number = 50;\n offsettop: number = 70;\n offsetleft: number = 65;\n offsetright: number = 25;\n showlegend: string = 'top';\n showlabels: 'inside' | 'outside' | 'hide' = 'outside';\n tooltips: boolean = true;\n interpolation: string = 'linear';\n highlightpoints: boolean = false;\n showvalues: boolean = false;\n showyaxis: boolean = true;\n showxaxis: boolean = true;\n ydomain: string = 'Min';\n xdomain: string = 'Min';\n labelangle: number = 0;\n xtickexpr?: (item: any, index: number, length: number) => any;\n ytickexpr?: (item: any, index: number, length: number) => any;\n hidegridxaxis: boolean = false;\n hidegridyaxis: boolean = false;\n autoadjustlabels: boolean = false;\n accessible?: boolean = true;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole;\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n ynumberformat?: string = '';\n showxaxislabels: boolean = true;\n showyaxislabels: boolean = true;\n chartheight?: number;\n}\n"],"mappings":";;;AACA,SAASA,sBAAsB,QAAQ,2DAA2D;AAGlG,eAAe,MAAMC,uBAAuB,SAASD,sBAAsB,CAAC;EAAAE,YAAA,GAAAC,IAAA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AA,eACvBC,SAAS;IAAAD,eAAA;IAAAA,eAAA;IAAAA,eAAA,wBAGA,EAAE;IAAAA,eAAA,0BACA,IAAI;IAAAA,eAAA,0BACJ,IAAI;IAAAA,eAAA;EAAA;AAEjC","ignoreList":[]}
1
+ {"version":3,"names":["SkeletonAnimationProps","BaseChartComponentProps","constructor","args","_defineProperty","undefined"],"sources":["basechart.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SkeletonAnimationProps } from '@wavemaker/app-rn-runtime/runtime/base-fragment.component';\nimport { AccessibilityRole } from 'react-native';\n\nexport default class BaseChartComponentProps extends SkeletonAnimationProps {\n xaxisdatakey: string = '';\n yaxisdatakey: string = '';\n iconclass = '';\n dataset: any;\n type: string = '';\n title: string = '';\n subheading: string = '';\n theme: string = '';\n xaxislabel: string = '';\n xunits: string = '';\n staggerlabels: boolean = false;\n yaxislabel: string = '';\n yunits: string = '';\n yaxislabeldistance?: number = undefined;\n xaxislabeldistance?: number = undefined;\n offsetxaxis?: number = undefined;\n offsetyaxis?: number = undefined;\n customcolors: string | Array<string> = '';\n legendheight: number = 0;\n labellegendheight: number = 0;\n labeltype: 'percent' | 'value' | 'key-value' | 'key' = 'percent';\n bubblesize: string= '';\n shape: string = '';\n loadingicon='fa fa-circle-o-notch fa-pulse';\n loadingdatamsg = 'Loading...';\n nodatamessage = 'No data found';\n offsetbottom: number = 50;\n offsettop: number = 70;\n offsetleft: number = 65;\n offsetright: number = 25;\n showlegend: string = 'top';\n showlabels: 'inside' | 'outside' | 'hide' = 'outside';\n tooltips: boolean = true;\n interpolation: string = 'linear';\n highlightpoints: boolean = false;\n showvalues: boolean = false;\n showyaxis: boolean = true;\n showxaxis: boolean = true;\n ydomain: string = 'Min';\n xdomain: string = 'Min';\n labelangle: number = 0;\n xtickexpr?: (item: any, index: number, length: number) => any;\n ytickexpr?: (item: any, index: number, length: number) => any;\n hidegridxaxis: boolean = false;\n hidegridyaxis: boolean = false;\n autoadjustlabels: boolean = false;\n accessible?: boolean = true;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole;\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n ynumberformat?: string = '';\n showxaxislabels: boolean = true;\n showyaxislabels: boolean = true;\n}\n"],"mappings":";;;AACA,SAASA,sBAAsB,QAAQ,2DAA2D;AAGlG,eAAe,MAAMC,uBAAuB,SAASD,sBAAsB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBACnD,EAAE;IAAAA,eAAA,uBACF,EAAE;IAAAA,eAAA,oBACb,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEC,EAAE;IAAAA,eAAA,gBACD,EAAE;IAAAA,eAAA,qBACG,EAAE;IAAAA,eAAA,gBACP,EAAE;IAAAA,eAAA,qBACG,EAAE;IAAAA,eAAA,iBACN,EAAE;IAAAA,eAAA,wBACM,KAAK;IAAAA,eAAA,qBACT,EAAE;IAAAA,eAAA,iBACN,EAAE;IAAAA,eAAA,6BACWC,SAAS;IAAAD,eAAA,6BACTC,SAAS;IAAAD,eAAA,sBAChBC,SAAS;IAAAD,eAAA,sBACTC,SAAS;IAAAD,eAAA,uBACO,EAAE;IAAAA,eAAA,uBAClB,CAAC;IAAAA,eAAA,4BACI,CAAC;IAAAA,eAAA,oBAC0B,SAAS;IAAAA,eAAA,qBAC5C,EAAE;IAAAA,eAAA,gBACN,EAAE;IAAAA,eAAA,sBACN,+BAA+B;IAAAA,eAAA,yBAC1B,YAAY;IAAAA,eAAA,wBACb,eAAe;IAAAA,eAAA,uBACR,EAAE;IAAAA,eAAA,oBACL,EAAE;IAAAA,eAAA,qBACD,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA,qBACH,KAAK;IAAAA,eAAA,qBACkB,SAAS;IAAAA,eAAA,mBACjC,IAAI;IAAAA,eAAA,wBACA,QAAQ;IAAAA,eAAA,0BACL,KAAK;IAAAA,eAAA,qBACV,KAAK;IAAAA,eAAA,oBACN,IAAI;IAAAA,eAAA,oBACJ,IAAI;IAAAA,eAAA,kBACP,KAAK;IAAAA,eAAA,kBACL,KAAK;IAAAA,eAAA,qBACF,CAAC;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,wBAGG,KAAK;IAAAA,eAAA,wBACL,KAAK;IAAAA,eAAA,2BACF,KAAK;IAAAA,eAAA,qBACV,IAAI;IAAAA,eAAA,6BACGC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA;IAAAA,eAAA;IAAAA,eAAA,wBAGA,EAAE;IAAAA,eAAA,0BACA,IAAI;IAAAA,eAAA,0BACJ,IAAI;EAAA;AACjC","ignoreList":[]}
@@ -44,30 +44,13 @@ export default class WmBubbleChart extends BaseChartComponent {
44
44
  });
45
45
  }
46
46
  renderWidget(props) {
47
- var _this$state$data, _props$chartheight, _this$styles$root, _this$styles$root2, _this$styles$root3, _this$styles$root4, _this$styles$root5, _this$styles$root6;
47
+ var _this$state$data;
48
48
  this.invokeEventCallback('onBeforerender', [this.proxy, null]);
49
49
  if (!((_this$state$data = this.state.data) !== null && _this$state$data !== void 0 && _this$state$data.length)) {
50
50
  return null;
51
51
  }
52
- let offsetTop = props.offsettop;
53
- let offsetHeight = 0;
54
- let victoryChartHeight = (_props$chartheight = props.chartheight) !== null && _props$chartheight !== void 0 ? _props$chartheight : this.styles.root.height;
55
- if ((_this$styles$root = this.styles.root) !== null && _this$styles$root !== void 0 && _this$styles$root.height && typeof ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height) === 'number') {
56
- offsetTop = this.styles.root.height / 250 * props.offsettop;
57
- offsetHeight = this.styles.root.height >= 250 && !props.chartheight && props.chartheight !== 0 ? 0 : offsetTop + props.offsetbottom;
58
- }
59
- if (typeof victoryChartHeight === 'number') {
60
- victoryChartHeight = victoryChartHeight + offsetHeight;
61
- }
62
- let containerStyle = {
63
- ...this.styles.root
64
- };
65
- if (containerStyle !== null && containerStyle !== void 0 && containerStyle.height) {
66
- containerStyle['minHeight'] = containerStyle['height'];
67
- delete containerStyle['height'];
68
- }
69
52
  return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
70
- style: containerStyle,
53
+ style: this.styles.root,
71
54
  onLayout: this.onViewLayoutChange.bind(this)
72
55
  }), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
73
56
  style: {
@@ -85,10 +68,10 @@ export default class WmBubbleChart extends BaseChartComponent {
85
68
  ref: this.viewRef
86
69
  }, this.getTooltip(), /*#__PURE__*/React.createElement(VictoryChart, {
87
70
  theme: this.state.theme,
88
- height: victoryChartHeight,
71
+ height: this.styles.root.height,
89
72
  width: this.state.chartWidth || this.screenWidth,
90
73
  padding: {
91
- top: offsetTop,
74
+ top: props.offsettop,
92
75
  bottom: props.offsetbottom,
93
76
  left: this.isRTL ? props.offsetright : props.offsetleft,
94
77
  right: this.isRTL ? props.offsetleft : props.offsetright
@@ -100,7 +83,7 @@ export default class WmBubbleChart extends BaseChartComponent {
100
83
  gutter: 20,
101
84
  data: [],
102
85
  theme: this.state.theme
103
- }), this.getLegendView(undefined, (_this$styles$root3 = this.styles.root) !== null && _this$styles$root3 !== void 0 && _this$styles$root3.height && typeof ((_this$styles$root4 = this.styles.root) === null || _this$styles$root4 === void 0 ? void 0 : _this$styles$root4.height) === 'string' || (_this$styles$root5 = this.styles.root) !== null && _this$styles$root5 !== void 0 && _this$styles$root5.height && typeof ((_this$styles$root6 = this.styles.root) === null || _this$styles$root6 === void 0 ? void 0 : _this$styles$root6.height) === 'number' && this.styles.root.height >= 250 ? 0 : offsetHeight), this.getXaxis(offsetHeight), this.getYAxis(), this.state.data.map((d, i) => {
86
+ }), this.getLegendView(), this.getXaxis(), this.getYAxis(), this.state.data.map((d, i) => {
104
87
  return /*#__PURE__*/React.createElement(VictoryScatter, {
105
88
  colorScale: this.state.colors,
106
89
  style: {