@wavemaker/app-rn-runtime 12.0.0-next.45031 → 12.0.0-next.45501

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +18 -3
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  4. app-rn-runtime/components/basic/anchor/anchor.component.js +2 -2
  5. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  6. app-rn-runtime/components/basic/animatedview.component.js +6 -2
  7. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  8. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  9. app-rn-runtime/components/basic/button/button.component.js +5 -4
  10. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  11. app-rn-runtime/components/basic/icon/icon.component.js +4 -4
  12. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  13. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  14. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  15. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  16. app-rn-runtime/components/basic/picture/picture.component.js +1 -2
  17. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  18. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
  19. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  20. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
  21. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  22. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  23. app-rn-runtime/components/basic/spinner/spinner.component.js +2 -3
  24. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  25. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  26. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  27. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  28. app-rn-runtime/components/basic/video/video.styles.js +4 -1
  29. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  30. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  31. app-rn-runtime/components/chart/basechart.component.js +31 -2
  32. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  33. app-rn-runtime/components/chart/basechart.props.js +1 -0
  34. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  35. app-rn-runtime/components/chart/basechart.styles.js +4 -0
  36. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  37. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
  38. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  39. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +4 -1
  40. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  41. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
  42. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  43. app-rn-runtime/components/container/accordion/accordion.component.js +3 -1
  44. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  45. app-rn-runtime/components/container/accordion/accordion.styles.js +1 -0
  46. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  47. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  48. app-rn-runtime/components/container/panel/panel.component.js +4 -2
  49. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  50. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -3
  51. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  52. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  53. app-rn-runtime/components/container/wizard/wizard.component.js +27 -11
  54. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  55. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  56. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  57. app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -3
  58. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  59. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  60. app-rn-runtime/components/input/baseinput/baseinput.component.js +11 -4
  61. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  62. app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
  63. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  64. app-rn-runtime/components/input/basenumber/basenumber.component.js +25 -12
  65. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  66. app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
  67. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  68. app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -6
  69. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  70. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +3 -2
  71. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  72. app-rn-runtime/components/input/chips/chips.component.js +3 -2
  73. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  74. app-rn-runtime/components/input/currency/currency.component.js +16 -1
  75. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  76. app-rn-runtime/components/input/epoch/base-datetime.component.js +22 -5
  77. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  78. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
  79. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
  80. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
  81. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
  82. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  83. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
  84. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  85. app-rn-runtime/components/input/number/number.component.js +6 -3
  86. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  87. app-rn-runtime/components/input/radioset/radioset.component.js +6 -6
  88. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  89. app-rn-runtime/components/input/select/select.component.js +23 -9
  90. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  91. app-rn-runtime/components/input/switch/switch.component.js +2 -2
  92. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  93. app-rn-runtime/components/input/toggle/toggle.component.js +2 -4
  94. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  95. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
  96. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  97. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  98. app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
  99. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  100. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  101. app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
  102. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  103. app-rn-runtime/core/base.component.js +2 -1
  104. app-rn-runtime/core/base.component.js.map +1 -1
  105. app-rn-runtime/core/components/textinput.component.js +4 -3
  106. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  107. app-rn-runtime/core/formatters.js.map +1 -1
  108. app-rn-runtime/core/key.extractor.js.map +1 -1
  109. app-rn-runtime/core/props.provider.js +3 -0
  110. app-rn-runtime/core/props.provider.js.map +1 -1
  111. app-rn-runtime/core/storage.service.js.map +1 -1
  112. app-rn-runtime/core/tappable.component.js +26 -25
  113. app-rn-runtime/core/tappable.component.js.map +1 -1
  114. app-rn-runtime/core/ui-preferences.context.js +7 -0
  115. app-rn-runtime/core/ui-preferences.context.js.map +1 -0
  116. app-rn-runtime/core/utils.js +66 -4
  117. app-rn-runtime/core/utils.js.map +1 -1
  118. app-rn-runtime/package.json +28 -7
  119. app-rn-runtime/runtime/App.js +2 -1
  120. app-rn-runtime/runtime/App.js.map +1 -1
  121. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  122. app-rn-runtime/runtime/base-fragment.component.js +15 -0
  123. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  124. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  125. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  126. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  127. app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
  128. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  129. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  130. app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
  131. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  132. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  133. app-rn-runtime/runtime/watcher.js.map +1 -1
  134. app-rn-runtime/styles/background.component.js +1 -0
  135. app-rn-runtime/styles/background.component.js.map +1 -1
  136. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  137. app-rn-runtime/styles/theme.js.map +1 -1
  138. app-rn-runtime/variables/base-variable.js.map +1 -1
  139. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  140. app-rn-runtime/variables/device-variable.js.map +1 -1
  141. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","Dimensions","View","Text","moment","forEach","get","isArray","isEmpty","isObject","maxBy","minBy","set","trim","orderBy","VictoryAxis","VictoryLegend","VictoryLabel","BaseComponent","BaseComponentState","WmIcon","ThemeFactory","DEFAULT_CLASS","constructSampleData","getChartType","isWebPreviewMode","BaseChartComponentState","constructor","args","_defineProperty","undefined","screenWidth","width","shapes","SI_SYMBOL","BaseChartComponent","props","defaultClass","defaultProps","defaultState","theme","applyTheme","subscribe","event","updateState","isTooltipOpen","componentDidMount","onViewLayoutChange","e","viewWidth","nativeEvent","layout","viewHeight","height","state","chartWidth","Number","totalHeight","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","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","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","yTickLabels","x","offsetxaxis","dependentAxis","setTooltipTemplate","partialName","template","setTooltipPosition","xCoordinate","offsetX","locationX","yCoordinate","offsetY","locationY","tooltipXPosition","tooltipoffsetx","tooltipYPosition","tooltipoffsety","setTooltipPartialLayout","tooltipLayout","renderPointer","transform","rotate","bottom","tooltipPointer","borderBottomWidth","getTooltip","renderitempartial","onLayout","bind","position","zIndex","selectedItem","index","tooltipContainer","fontSize","fontWeight","tooltipXText","tooltipXaxis","tooltipYaxis","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","split","map","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","yVal","parseFloat","bubblesize","invokeEventCallback","proxy","setTimeout","endAngle","updateData","renderLoadingIcon","loadingIcon","iconclass","loadingicon","caption","loadingdatamsg","labeltype","setTotal","ydomain","xdomain","loading","total","onPropertyChange","$new","$old","units","xLabel","yLabel","getDataType","widgetContext","Error"],"sources":["basechart.component.tsx"],"sourcesContent":["import React from \"react\";\nimport { Dimensions, View, Text, LayoutChangeEvent, LayoutRectangle} 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\";\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 = 60;\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 constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\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 if (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 // 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: 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 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: this.theme.mergeStyle(this.styles.tickLabels, this.styles.yTickLabels)\n }}\n fixLabelOverlap= {props.autoadjustlabels?true:false}\n axisLabelComponent={<VictoryLabel x={xaxislabeldistance}/>}\n tickLabelComponent={<VictoryLabel x={props.offsetxaxis ? 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 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 setTooltipPosition(nativeEvent: any){\n let xCoordinate = isWebPreviewMode() ? nativeEvent.offsetX : nativeEvent.locationX;\n let yCoordinate = isWebPreviewMode() ? nativeEvent.offsetY : nativeEvent.locationY;\n this.updateState({\n tooltipXPosition: xCoordinate - this.state.tooltipoffsetx,\n tooltipYPosition: yCoordinate - this.state.tooltipoffsety,\n } 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 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, 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}>{this.state.tooltipYaxis}</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 if (typeof props.customcolors === 'string' && !isEmpty(props.customcolors)) {\n colorsToUse = props.customcolors.split(',').map(trim);\n }\n let themeToUse;\n if (typeof themeName === 'string') {\n if (!colorsToUse.length) {\n colorsToUse = props.customcolors as string[];\n }\n if(props.customcolors===undefined) {\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 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 if (isEmpty($new)) {\n return;\n }\n if (typeof $new === 'string') {\n $new = $new.split(',');\n }\n this.updateState({\n colors: $new\n } as S);\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}\nfunction getDataType(widgetContext: {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J;EACF;AACF;AACA,SAASG,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","trim","orderBy","VictoryAxis","VictoryLegend","VictoryLabel","BaseComponent","BaseComponentState","WmIcon","ThemeFactory","DEFAULT_CLASS","constructSampleData","getChartType","isWebPreviewMode","BaseChartComponentState","constructor","args","_defineProperty","undefined","screenWidth","width","shapes","SI_SYMBOL","BaseChartComponent","props","defaultClass","defaultProps","defaultState","theme","applyTheme","subscribe","event","updateState","isTooltipOpen","componentDidMount","onViewLayoutChange","e","viewWidth","nativeEvent","layout","viewHeight","height","state","chartWidth","Number","totalHeight","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","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","yTickLabels","x","offsetxaxis","dependentAxis","setTooltipTemplate","partialName","template","setTooltipPosition","xCoordinate","offsetX","locationX","yCoordinate","offsetY","locationY","tooltipXPosition","tooltipoffsetx","tooltipYPosition","tooltipoffsety","setTooltipPartialLayout","tooltipLayout","renderPointer","transform","rotate","bottom","tooltipPointer","borderBottomWidth","getTooltip","yAxisData","tooltipYaxis","renderitempartial","onLayout","bind","position","zIndex","selectedItem","index","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","split","map","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","getDataType","widgetContext","Error"],"sources":["basechart.component.tsx"],"sourcesContent":["import React from \"react\";\nimport { Dimensions, View, Text, LayoutChangeEvent, LayoutRectangle} 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\";\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 = 60;\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 constructor(props: T, public defaultClass: string = DEFAULT_CLASS, defaultProps?: T, defaultState?: S) {\n super(props, defaultClass, defaultProps, defaultState);\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 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: 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: this.theme.mergeStyle(this.styles.tickLabels, this.styles.yTickLabels)\n }}\n fixLabelOverlap= {props.autoadjustlabels?true:false}\n axisLabelComponent={<VictoryLabel x={xaxislabeldistance}/>}\n tickLabelComponent={<VictoryLabel x={props.offsetxaxis ? 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 setTooltipPosition(nativeEvent: any){\n let xCoordinate = isWebPreviewMode() ? nativeEvent.offsetX : nativeEvent.locationX;\n let yCoordinate = isWebPreviewMode() ? nativeEvent.offsetY : nativeEvent.locationY;\n this.updateState({\n tooltipXPosition: xCoordinate - this.state.tooltipoffsetx,\n tooltipYPosition: yCoordinate - this.state.tooltipoffsety,\n } 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 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, 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 if (typeof props.customcolors === 'string' && !isEmpty(props.customcolors)) {\n colorsToUse = props.customcolors.split(',').map(trim);\n }\n let themeToUse;\n if (typeof themeName === 'string') {\n if (!colorsToUse.length) {\n colorsToUse = props.customcolors as string[];\n }\n if(props.customcolors===undefined) {\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 if (isEmpty($new)) {\n return;\n }\n if (typeof $new === 'string') {\n $new = $new.split(',');\n }\n this.updateState({\n colors: $new\n } as S);\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}\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,QAA2C,cA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IAAI,CAACrG,WAAW,CAAC;UACfiP,MAAM,EAAEJ,IAAI,GAAGE;QACjB,CAAM,CAAC;QACP;IACJ;EACF;AACF;AACA,SAASG,WAAWA,CAACC,aAAuE,EAAO;EACjG,MAAM,IAAIC,KAAK,CAAC,2BAA2B,CAAC;AAC9C","ignoreList":[]}
@@ -55,6 +55,7 @@ export default class BaseChartComponentProps extends BaseProps {
55
55
  _defineProperty(this, "hint", undefined);
56
56
  _defineProperty(this, "accessibilityrole", void 0);
57
57
  _defineProperty(this, "renderitempartial", void 0);
58
+ _defineProperty(this, "ynumberformat", '');
58
59
  }
59
60
  }
60
61
  //# sourceMappingURL=basechart.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","BaseChartComponentProps","constructor","args","_defineProperty","undefined"],"sources":["basechart.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityRole } from 'react-native';\n\nexport default class BaseChartComponentProps extends BaseProps {\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 = false;\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 accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole;\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,uBAAuB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBACtC,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,KAAK;IAAAA,eAAA,wBACD,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,6BACHC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA;IAAAA,eAAA;EAAA;AAG3B","ignoreList":[]}
1
+ {"version":3,"names":["BaseProps","BaseChartComponentProps","constructor","args","_defineProperty","undefined"],"sources":["basechart.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityRole } from 'react-native';\n\nexport default class BaseChartComponentProps extends BaseProps {\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 = false;\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 accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole;\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n ynumberformat?: string = '';\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,uBAAuB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBACtC,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,KAAK;IAAAA,eAAA,wBACD,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,6BACHC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA;IAAAA,eAAA;IAAAA,eAAA,wBAGA,EAAE;EAAA;AAC7B","ignoreList":[]}
@@ -86,6 +86,10 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
86
86
  borderRightColor: themeVariables.transparent,
87
87
  borderBottomColor: themeVariables.tooltipBgColor,
88
88
  overflow: 'hidden'
89
+ },
90
+ centerLabel: {
91
+ color: themeVariables.chartTitleColor,
92
+ fontSize: 20
89
93
  }
90
94
  });
91
95
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["Color","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","icon","fontSize","line","color","chartLineColor","title","chartTitleColor","lineHeight","paddingLeft","subHeading","chartSubTitleColor","legendText","legenedDot","axis","stroke","chartAxisColor","fade","rgb","toString","xAxis","yAxis","axisLabel","xAxisLabel","yAxisLabel","grid","strokeDasharray","xGrid","yGrid","ticks","xTicks","yTicks","tickLabels","xTickLabels","yTickLabels","barChart","tooltipXText","tooltipYText","bar","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","tooltipContainer","position","backgroundColor","tooltipBgColor","flex","minWidth","minHeight","opacity","borderRadius","justifyContent","alignItems","elevation","zIndex","tooltipPointer","width","height","transparent","borderStyle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderLeftColor","borderRightColor","borderBottomColor","overflow"],"sources":["basechart.styles.ts"],"sourcesContent":["import { TextStyle, ViewStyle } from 'react-native';\nimport Color from \"color\";\nimport BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { VictoryStyleObject } from \"victory-core\";\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\n\nexport type BaseChartComponentStyles = BaseStyles & {\n title: TextStyle,\n icon: WmIconStyles,\n subHeading: TextStyle,\n axis: VictoryStyleObject,\n xAxis: VictoryStyleObject,\n yAxis: VictoryStyleObject,\n axisLabel: VictoryStyleObject,\n xAxisLabel: VictoryStyleObject,\n yAxisLabel: VictoryStyleObject,\n ticks: VictoryStyleObject,\n xTicks: VictoryStyleObject,\n yTicks: VictoryStyleObject,\n tickLabels: VictoryStyleObject,\n xTickLabels: VictoryStyleObject,\n yTickLabels: VictoryStyleObject,\n grid: VictoryStyleObject,\n xGrid: VictoryStyleObject,\n yGrid: VictoryStyleObject,\n legendText: TextStyle,\n legenedDot: ViewStyle,\n tooltipContainer: any,\n tooltipPointer: any\n tooltipXText: any,\n tooltipYText: any,\n bar: any;\n};\n\nexport const DEFAULT_CLASS = 'app-chart';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: BaseChartComponentStyles = defineStyles({\n root: {},\n text: {},\n icon: {\n icon: {\n fontSize: 20\n }\n } as WmIconStyles,\n line: {\n color: themeVariables.chartLineColor\n },\n title: {\n color: themeVariables.chartTitleColor,\n fontSize: 20,\n lineHeight: 24,\n paddingLeft: 10,\n },\n subHeading: {\n fontSize: 12,\n lineHeight: 16,\n color: themeVariables.chartSubTitleColor\n },\n legendText: {},\n legenedDot: {},\n axis: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.3).rgb().toString()\n } as any,\n xAxis: {} as any,\n yAxis: {} as any,\n axisLabel: {} as any,\n xAxisLabel: {} as any,\n yAxisLabel: {} as any,\n grid: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.8).rgb().toString(),\n strokeDasharray: '16 4'\n } as any,\n xGrid: {} as any,\n yGrid: {} as any,\n ticks: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.8).rgb().toString(),\n } as any,\n xTicks: {} as any,\n yTicks: {} as any,\n tickLabels: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.8).rgb().toString(),\n } as any,\n xTickLabels: {} as any,\n yTickLabels: {} as any,\n barChart: {},\n tooltipXText:{},\n tooltipYText:{},\n bar:{\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n },\n tooltipContainer: {\n position: 'absolute', \n backgroundColor: themeVariables.tooltipBgColor, \n flex: 1, \n minWidth: 100,\n minHeight: 60,\n opacity: 0.9, \n borderRadius: 12, \n justifyContent: 'center', \n alignItems: 'center', \n elevation: 2,\n zIndex: 99\n } as any,\n tooltipPointer: {\n position: 'absolute',\n width: 0,\n height: 0,\n backgroundColor: themeVariables.transparent,\n borderStyle: 'solid',\n borderLeftWidth: 8,\n borderRightWidth: 8,\n borderBottomWidth: 12,\n borderLeftColor: themeVariables.transparent,\n borderRightColor: themeVariables.transparent,\n borderBottomColor: themeVariables.tooltipBgColor,\n overflow: 'hidden',\n } as any\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AACA,OAAOA,KAAK,MAAO,OAAO;AAC1B,OAAOC,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAiCxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAA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EAAEtE,cAAc,CAACkD,cAAc;MAChDqB,QAAQ,EAAE;IACZ;EACF,CAAC,CAAC;EAEFtE,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Color","BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","icon","fontSize","line","color","chartLineColor","title","chartTitleColor","lineHeight","paddingLeft","subHeading","chartSubTitleColor","legendText","legenedDot","axis","stroke","chartAxisColor","fade","rgb","toString","xAxis","yAxis","axisLabel","xAxisLabel","yAxisLabel","grid","strokeDasharray","xGrid","yGrid","ticks","xTicks","yTicks","tickLabels","xTickLabels","yTickLabels","barChart","tooltipXText","tooltipYText","bar","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","tooltipContainer","position","backgroundColor","tooltipBgColor","flex","minWidth","minHeight","opacity","borderRadius","justifyContent","alignItems","elevation","zIndex","tooltipPointer","width","height","transparent","borderStyle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderLeftColor","borderRightColor","borderBottomColor","overflow","centerLabel"],"sources":["basechart.styles.ts"],"sourcesContent":["import { TextStyle, ViewStyle } from 'react-native';\nimport Color from \"color\";\nimport BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { VictoryStyleObject } from \"victory-core\";\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\n\nexport type BaseChartComponentStyles = BaseStyles & {\n title: TextStyle,\n icon: WmIconStyles,\n subHeading: TextStyle,\n axis: VictoryStyleObject,\n xAxis: VictoryStyleObject,\n yAxis: VictoryStyleObject,\n axisLabel: VictoryStyleObject,\n xAxisLabel: VictoryStyleObject,\n yAxisLabel: VictoryStyleObject,\n ticks: VictoryStyleObject,\n xTicks: VictoryStyleObject,\n yTicks: VictoryStyleObject,\n tickLabels: VictoryStyleObject,\n xTickLabels: VictoryStyleObject,\n yTickLabels: VictoryStyleObject,\n grid: VictoryStyleObject,\n xGrid: VictoryStyleObject,\n yGrid: VictoryStyleObject,\n legendText: TextStyle,\n legenedDot: ViewStyle,\n tooltipContainer: any,\n tooltipPointer: any\n tooltipXText: any,\n tooltipYText: any,\n bar: any;\n centerLabel: VictoryStyleObject\n};\n\nexport const DEFAULT_CLASS = 'app-chart';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: BaseChartComponentStyles = defineStyles({\n root: {},\n text: {},\n icon: {\n icon: {\n fontSize: 20\n }\n } as WmIconStyles,\n line: {\n color: themeVariables.chartLineColor\n },\n title: {\n color: themeVariables.chartTitleColor,\n fontSize: 20,\n lineHeight: 24,\n paddingLeft: 10,\n },\n subHeading: {\n fontSize: 12,\n lineHeight: 16,\n color: themeVariables.chartSubTitleColor\n },\n legendText: {},\n legenedDot: {},\n axis: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.3).rgb().toString()\n } as any,\n xAxis: {} as any,\n yAxis: {} as any,\n axisLabel: {} as any,\n xAxisLabel: {} as any,\n yAxisLabel: {} as any,\n grid: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.8).rgb().toString(),\n strokeDasharray: '16 4'\n } as any,\n xGrid: {} as any,\n yGrid: {} as any,\n ticks: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.8).rgb().toString(),\n } as any,\n xTicks: {} as any,\n yTicks: {} as any,\n tickLabels: {\n stroke: Color(themeVariables.chartAxisColor).fade(0.8).rgb().toString(),\n } as any,\n xTickLabels: {} as any,\n yTickLabels: {} as any,\n barChart: {},\n tooltipXText:{},\n tooltipYText:{},\n bar:{\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n },\n tooltipContainer: {\n position: 'absolute', \n backgroundColor: themeVariables.tooltipBgColor, \n flex: 1, \n minWidth: 100,\n minHeight: 60,\n opacity: 0.9, \n borderRadius: 12, \n justifyContent: 'center', \n alignItems: 'center', \n elevation: 2,\n zIndex: 99\n } as any,\n tooltipPointer: {\n position: 'absolute',\n width: 0,\n height: 0,\n backgroundColor: themeVariables.transparent,\n borderStyle: 'solid',\n borderLeftWidth: 8,\n borderRightWidth: 8,\n borderBottomWidth: 12,\n borderLeftColor: themeVariables.transparent,\n borderRightColor: themeVariables.transparent,\n borderBottomColor: themeVariables.tooltipBgColor,\n overflow: 'hidden',\n } as any,\n centerLabel: {\n color: themeVariables.chartTitleColor,\n fontSize: 20,\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AACA,OAAOA,KAAK,MAAO,OAAO;AAC1B,OAAOC,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAkCxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAuC,GAAGL,YAAY,CAAC;IAC3DM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE;MACJA,IAAI,EAAE;QACJC,QAAQ,EAAE;MACZ;IACF,CAAiB;IACjBC,IAAI,EAAE;MACJC,KAAK,EAAER,cAAc,CAACS;IACxB,CAAC;IACDC,KAAK,EAAE;MACLF,KAAK,EAAER,cAAc,CAACW,eAAe;MACrCL,QAAQ,EAAE,EAAE;MACZM,UAAU,EAAE,EAAE;MACdC,WAAW,EAAE;IACf,CAAC;IACDC,UAAU,EAAE;MACVR,QAAQ,EAAE,EAAE;MACZM,UAAU,EAAE,EAAE;MACdJ,KAAK,EAAER,cAAc,CAACe;IACxB,CAAC;IACDC,UAAU,EAAE,CAAC,CAAC;IACdC,UAAU,EAAE,CAAC,CAAC;IACdC,IAAI,EAAE;MACJC,MAAM,EAAExB,KAAK,CAACK,cAAc,CAACoB,cAA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AU;MACpBC,eAAe,EAAEjD,cAAc,CAACkD,cAAc;MAC9CC,IAAI,EAAE,CAAC;MACPC,QAAQ,EAAE,GAAG;MACbC,SAAS,EAAE,EAAE;MACbC,OAAO,EAAE,GAAG;MACZC,YAAY,EAAE,EAAE;MAChBC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,SAAS,EAAE,CAAC;MACZC,MAAM,EAAE;IACV,CAAQ;IACRC,cAAc,EAAE;MACdZ,QAAQ,EAAE,UAAU;MACpBa,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE,CAAC;MACTb,eAAe,EAAEjD,cAAc,CAAC+D,WAAW;MAC3CC,WAAW,EAAE,OAAO;MACpBC,eAAe,EAAE,CAAC;MAClBC,gBAAgB,EAAE,CAAC;MACnBC,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAEpE,cAAc,CAAC+D,WAAW;MAC3CM,gBAAgB,EAAErE,cAAc,CAAC+D,WAAW;MAC5CO,iBAAiB,EAAEtE,cAAc,CAACkD,cAAc;MAChDqB,QAAQ,EAAE;IACZ,CAAQ;IACRC,WAAW,EAAE;MACXhE,KAAK,EAAER,cAAc,CAACW,eAAe;MACrCL,QAAQ,EAAE;IACZ;EACF,CAAC,CAAC;EAEFL,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
@@ -1,12 +1,13 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
  import React from 'react';
3
- import { View, Platform } from 'react-native';
3
+ import { Text, View, Platform } from 'react-native';
4
4
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
5
5
  import WmBubbleChartProps from './bubble-chart.props';
6
6
  import { DEFAULT_CLASS } from './bubble-chart.styles';
7
7
  import { BaseChartComponent, BaseChartComponentState } from "@wavemaker/app-rn-runtime/components/chart/basechart.component";
8
8
  import { VictoryChart, VictoryLegend, VictoryScatter } from "victory-native";
9
9
  import { Svg } from "react-native-svg";
10
+ import WmIcon from '../../basic/icon/icon.component';
10
11
  export class WmBubbleChartState extends BaseChartComponentState {}
11
12
  export default class WmBubbleChart extends BaseChartComponent {
12
13
  constructor(props) {
@@ -44,7 +45,19 @@ export default class WmBubbleChart extends BaseChartComponent {
44
45
  return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
45
46
  style: this.styles.root,
46
47
  onLayout: this.onViewLayoutChange.bind(this)
47
- }), this.getTooltip(), /*#__PURE__*/React.createElement(VictoryChart, {
48
+ }), this.getTooltip(), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
49
+ style: {
50
+ flexDirection: 'row',
51
+ alignItems: 'center'
52
+ }
53
+ }, props.iconclass ? /*#__PURE__*/React.createElement(WmIcon, {
54
+ iconclass: props.iconclass,
55
+ styles: this.styles.icon
56
+ }) : null, /*#__PURE__*/React.createElement(Text, {
57
+ style: this.styles.title
58
+ }, props.title)), /*#__PURE__*/React.createElement(Text, {
59
+ style: this.styles.subHeading
60
+ }, props.subheading)), /*#__PURE__*/React.createElement(VictoryChart, {
48
61
  theme: this.state.theme,
49
62
  height: this.styles.root.height,
50
63
  width: this.state.chartWidth || this.screenWidth,
@@ -57,7 +70,6 @@ export default class WmBubbleChart extends BaseChartComponent {
57
70
  }, /*#__PURE__*/React.createElement(VictoryLegend, {
58
71
  name: 'legend',
59
72
  containerComponent: /*#__PURE__*/React.createElement(Svg, null),
60
- title: [props.title, props.subheading],
61
73
  orientation: "horizontal",
62
74
  gutter: 20,
63
75
  data: [],
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Platform","AccessibilityWidgetType","getAccessibilityProps","WmBubbleChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","VictoryChart","VictoryLegend","VictoryScatter","Svg","WmBubbleChartState","WmBubbleChart","constructor","props","onSelect","event","data","value","index","y","label","state","xaxisDatakeyArr","datum","x","selectedItem","dataset","nativeEvent","setTooltipPosition","selectedChartItem","series","_dataObj","updateState","tooltipXaxis","tooltipYaxis","isTooltipOpen","invokeEventCallback","proxy","renderWidget","_this$state$data","length","createElement","_extends","LINECHART","style","styles","root","onLayout","onViewLayoutChange","bind","getTooltip","theme","height","width","chartWidth","screenWidth","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","name","containerComponent","title","subheading","orientation","gutter","getLegendView","getXaxis","getYAxis","map","d","i","colorScale","colors","fill","opacity","key","size","events","target","eventHandlers","OS","onClick","onPress"],"sources":["bubble-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport {Text, View, Platform} from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport WmBubbleChartProps from './bubble-chart.props';\nimport { DEFAULT_CLASS, WmBubbleChartStyles } from './bubble-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport {VictoryAxis, VictoryChart, VictoryLegend, VictoryLine, VictoryScatter} from \"victory-native\";\nimport { ScatterSymbolType } from \"victory-core\";\nimport {Svg} from \"react-native-svg\";\nimport {get} from \"lodash-es\";\n\nexport class WmBubbleChartState extends BaseChartComponentState<WmBubbleChartProps> {}\n\nexport default class WmBubbleChart extends BaseChartComponent<WmBubbleChartProps, WmBubbleChartState, WmBubbleChartStyles> {\n\n constructor(props: WmBubbleChartProps) {\n super(props, DEFAULT_CLASS, new WmBubbleChartProps(), new WmBubbleChartState());\n }\n\n onSelect(event: any, data: any){\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 this.setTooltipPosition(nativeEvent);\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 } as WmBubbleChartState)\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmBubbleChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n return (<View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n {this.getTooltip()}\n <VictoryChart\n theme={this.state.theme}\n height={this.styles.root.height as number}\n width={this.state.chartWidth || this.screenWidth}\n padding={{ top: props.offsettop, bottom: props.offsetbottom, left: props.offsetleft, right: props.offsetright }}\n >\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n title={[props.title, props.subheading]}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n {this.state.data.map((d: any, i: number) => {\n return <VictoryScatter\n colorScale={this.state.colors}\n style={{\n data: { fill: this.state.colors[i], opacity: ({ datum }: any) => datum.opacity }\n }}\n key={props.name + '_bubble_' + i}\n name={props.name + '_bubble_' + i}\n data={d}\n size={5}\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 />\n })}\n </VictoryChart></View>);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAcC,IAAI,EAAEC,QAAQ,QAAO,cAAc;AAEjD,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,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AAI,CAAC,IAAI;UAClC;QACF,CAAC;MAAE,CACJ,CAAC;IACJ,CAAC,CACa,CAAO,CAAC;EAC1B;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Text","View","Platform","AccessibilityWidgetType","getAccessibilityProps","WmBubbleChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","VictoryChart","VictoryLegend","VictoryScatter","Svg","WmIcon","WmBubbleChartState","WmBubbleChart","constructor","props","onSelect","event","data","value","index","y","label","state","xaxisDatakeyArr","datum","x","selectedItem","dataset","nativeEvent","setTooltipPosition","selectedChartItem","series","_dataObj","updateState","tooltipXaxis","tooltipYaxis","isTooltipOpen","invokeEventCallback","proxy","renderWidget","_this$state$data","length","createElement","_extends","LINECHART","style","styles","root","onLayout","onViewLayoutChange","bind","getTooltip","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","theme","height","width","chartWidth","screenWidth","padding","top","offsettop","bottom","offsetbottom","left","offsetleft","right","offsetright","name","containerComponent","orientation","gutter","getLegendView","getXaxis","getYAxis","map","d","i","colorScale","colors","fill","opacity","key","size","events","target","eventHandlers","OS","onClick","onPress"],"sources":["bubble-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport {Text, View, Platform} from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport WmBubbleChartProps from './bubble-chart.props';\nimport { DEFAULT_CLASS, WmBubbleChartStyles } from './bubble-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker/app-rn-runtime/components/chart/basechart.component\";\nimport {VictoryAxis, VictoryChart, VictoryLegend, VictoryLine, VictoryScatter} from \"victory-native\";\nimport { ScatterSymbolType } from \"victory-core\";\nimport {Svg} from \"react-native-svg\";\nimport {get} from \"lodash-es\";\nimport WmIcon from '../../basic/icon/icon.component';\n\nexport class WmBubbleChartState extends BaseChartComponentState<WmBubbleChartProps> {}\n\nexport default class WmBubbleChart extends BaseChartComponent<WmBubbleChartProps, WmBubbleChartState, WmBubbleChartStyles> {\n\n constructor(props: WmBubbleChartProps) {\n super(props, DEFAULT_CLASS, new WmBubbleChartProps(), new WmBubbleChartState());\n }\n\n onSelect(event: any, data: any){\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 this.setTooltipPosition(nativeEvent);\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 } as WmBubbleChartState)\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmBubbleChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n return (<View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n {this.getTooltip()}\n <View>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n { props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\n <VictoryChart\n theme={this.state.theme}\n height={this.styles.root.height as number}\n width={this.state.chartWidth || this.screenWidth}\n padding={{ top: props.offsettop, bottom: props.offsetbottom, left: props.offsetleft, right: props.offsetright }}\n >\n <VictoryLegend\n name={'legend'}\n containerComponent={<Svg />}\n orientation=\"horizontal\"\n gutter={20}\n data={[]}\n theme={this.state.theme}\n />\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n {this.state.data.map((d: any, i: number) => {\n return <VictoryScatter\n colorScale={this.state.colors}\n style={{\n data: { fill: this.state.colors[i], opacity: ({ datum }: any) => datum.opacity }\n }}\n key={props.name + '_bubble_' + i}\n name={props.name + '_bubble_' + i}\n data={d}\n size={5}\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 />\n })}\n </VictoryChart></View>);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAO,cAAc;AAEjD,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAC1E,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,gEAAgE;AACvE,SAAqBC,YAAY,EAAEC,aAAa,EAAeC,cAAc,QAAO,gBAAgB;AAEpG,SAAQC,GAAG,QAAO,kBAAkB;AAEpC,OAAOC,MAAM,MAAM,iCAAiC;AAEpD,OAAO,MAAMC,kBAAkB,SAASN,uBAAuB,CAAqB;AAEpF,eAAe,MAAMO,aAAa,SAASR,kBAAkB,CAA8D;EAEzHS,WAAWA,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,kBAAkB,CAAC,CAAC,EAAE,IAAIS,kBAAkB,CAAC,CAAC,CAAC;EACjF;EAEAI,QAAQA,CAACC,KAAU,EAAEC,IAAS,EAAC;IAC7B,IAAIC,KAAK,GAAGD,IAAI,CAACA,IAAI,CAACA,IAAI,CAACE,KAAK,CAAC,CAACC,CAAC;IACnC,IAAIC,KAAK,GAAG,IAAI,CAACC,KAAK,CAACC,eAAe,CAACN,IAAI,CAACO,KAAK,CAACC,CAAC,CAAC;IACpD,IAAIC,YAAY,GAAG,IAAI,CAACZ,KAAK,CAACa,OAAO,CAACV,IAAI,CAACE,KAAK,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T0C,KAAK,EAAE,IAAI,CAACrC,KAAK,CAACqC;IAAM,CACzB,CAAC,EACD,IAAI,CAACkB,aAAa,CAAC,CAAC,EACpB,IAAI,CAACC,QAAQ,CAAC,CAAC,EACf,IAAI,CAACC,QAAQ,CAAC,CAAC,EACf,IAAI,CAACzD,KAAK,CAACL,IAAI,CAAC+D,GAAG,CAAC,CAACC,CAAM,EAAEC,CAAS,KAAK;MAC5C,oBAAOtF,KAAA,CAAA8C,aAAA,CAAClC,cAAc;QACpB2E,UAAU,EAAE,IAAI,CAAC7D,KAAK,CAAC8D,MAAO;QAC9BvC,KAAK,EAAE;UACL5B,IAAI,EAAE;YAAEoE,IAAI,EAAE,IAAI,CAAC/D,KAAK,CAAC8D,MAAM,CAACF,CAAC,CAAC;YAAEI,OAAO,EAAEA,CAAC;cAAE9D;YAAW,CAAC,KAAKA,KAAK,CAAC8D;UAAQ;QACjF,CAAE;QACFC,GAAG,EAAEzE,KAAK,CAAC2D,IAAI,GAAG,UAAU,GAAGS,CAAE;QACjCT,IAAI,EAAE3D,KAAK,CAAC2D,IAAI,GAAG,UAAU,GAAGS,CAAE;QAClCjE,IAAI,EAAEgE,CAAE;QACRO,IAAI,EAAE,CAAE;QACRC,MAAM,EAAE,CAAC;UACPC,MAAM,EAAE,MAAM;UACdC,aAAa,EAAE5F,QAAQ,CAAC6F,EAAE,IAAI,KAAK,GAAG;YACpCC,OAAO,EAAE,IAAI,CAAC9E,QAAQ,CAACmC,IAAI,CAAC,IAAI;UAClC,CAAC,GAAC;YACA4C,OAAO,EAAE,IAAI,CAAC/E,QAAQ,CAACmC,IAAI,CAAC,IAAI;UAClC;QACF,CAAC;MAAE,CACJ,CAAC;IACJ,CAAC,CACa,CAAO,CAAC;EAC1B;AACF","ignoreList":[]}
@@ -198,7 +198,10 @@ export default class WmPieChart extends BaseChartComponent {
198
198
  }]
199
199
  }), /*#__PURE__*/React.createElement(VictoryLabel, {
200
200
  textAnchor: "middle",
201
- style: this.styles.title,
201
+ style: {
202
+ ...this.styles.centerLabel,
203
+ fill: this.styles.centerLabel.color
204
+ },
202
205
  x: origin.x,
203
206
  y: origin.y,
204
207
  text: props.centerlabel
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","Platform","Svg","AccessibilityWidgetType","getAccessibilityProps","VictoryLabel","VictoryPie","WmPieChartProps","DEFAULT_CLASS","formatCompactNumber","WmIcon","BaseChartComponent","BaseChartComponentState","WmDonutChartProps","Legend","WmPieChartState","constructor","args","_defineProperty","WmPieChart","props","type","e","_e$nativeEvent","viewWidth","nativeEvent","layout","width","updateState","chartWidth","totalHeight","height","_e$nativeEvent2","infoHeight","opacity","_e$nativeEvent3","_e$nativeEvent4","legendWidth","legendHeight","componentDidMount","getLabel","d","labeltype","Math","round","y","state","total","xaxisDatakeyArr","x","onSelect","event","data","value","slice","label","datum","selectedItem","dataset","index","selectedChartItem","color","style","fill","_dataObj","setTooltipPosition","tooltipXaxis","tooltipYaxis","isTooltipOpen","invokeEventCallback","proxy","renderWidget","length","pieData","showlegend","chartHeight","styles","root","radius","min","innerRadius","donutratio","styleProp","labelRadius","showlabels","labels","display","origin","orientation","legendData","map","name","colors","createElement","_extends","LINECHART","onLayout","onViewLayoutChange","onInfoViewLayoutChange","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","onLegendViewLayoutChange","testStyle","legendText","dotStyle","legenedDot","justifyContent","getTooltip","flex","standalone","colorScale","endAngle","theme","key","isRTL","toReversed","labelPlacement","labelplacement","events","target","eventHandlers","OS","onClick","bind","onPress","textAnchor","text","centerlabel","maxWidth"],"sources":["pie-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport { VictoryLabel, VictoryLegend, VictoryPie } from 'victory-native';\n\nimport WmPieChartProps from './pie-chart.props';\nimport { DEFAULT_CLASS, WmPieChartStyles } from './pie-chart.styles';\n\nimport { formatCompactNumber } from '@wavemaker/app-rn-runtime/core/utils';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\nimport WmDonutChartProps from '@wavemaker/app-rn-runtime/components/chart/donut-chart/donut-chart.props';\nimport { Legend } from '../legend/legend.component';\n\n\nexport class WmPieChartState extends BaseChartComponentState<WmPieChartProps> {\n chartWidth = 0;\n totalHeight = 0;\n infoHeight = 10;\n legendWidth = 0;\n legendHeight = 0;\n opacity = 0;\n}\n\nexport default class WmPieChart extends BaseChartComponent<WmPieChartProps, WmPieChartState, WmPieChartStyles> {\n\n constructor(props: WmPieChartProps) {\n super(props, DEFAULT_CLASS, props.type === 'Donut' ? new WmDonutChartProps() : new WmPieChartProps(), new WmPieChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth,\n totalHeight: e.nativeEvent?.layout.height\n } as WmPieChartState)\n }\n\n onInfoViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n infoHeight: e.nativeEvent?.layout.height,\n opacity: 1\n } as WmPieChartState);\n }\n\n onLegendViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n legendWidth: e.nativeEvent?.layout.width,\n legendHeight: e.nativeEvent?.layout.height\n } as WmPieChartState);\n }\n\n getLabel(d: {x: any, y: any}, props: WmPieChartProps): string {\n switch(props.labeltype) {\n case 'percent': {\n return Math.round(d.y * 100 /this.state.total) + '%';\n }\n case 'key': {\n return this.state.xaxisDatakeyArr[d.x];\n }\n case 'value': {\n return formatCompactNumber(d.y);\n }\n case 'key-value': {\n return this.state.xaxisDatakeyArr[d.x] + ' ' + d.y;\n }\n }\n }\n\n onSelect(event: any, data: any){\n let value = data.slice.value;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = data.slice;\n selectedChartItem[\"data\"] = {x: label, y: value, color: data.style.fill, _dataObj: selectedItem}\n const nativeEvent = event.nativeEvent;\n this.setTooltipPosition(nativeEvent);\n this.updateState({\n tooltipXaxis: label,\n tooltipYaxis: value,\n isTooltipOpen: true,\n selectedItem: {...selectedItem, index: data.index},\n } as WmPieChartState)\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmPieChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n } \n const pieData = this.state.data[0];\n const chartWidth = this.state.chartWidth \n - (props.showlegend === 'right' ? this.state.legendWidth : 0);\n const chartHeight = (this.styles.root.height ? this.state.totalHeight : chartWidth) \n - this.state.infoHeight \n - (props.showlegend === 'right' ? 0 : this.state.legendHeight);\n let radius = (Math.min(chartWidth, chartHeight) - 40)/ 2;\n let innerRadius = props.donutratio * radius;\n let styleProp = {};\n let labelRadius;\n if (props.showlabels === 'hide') {\n styleProp={labels: { display: \"none\" }};\n } else if (props.showlabels === 'inside') {\n labelRadius = radius/2;\n } else {\n labelRadius = radius + 8;\n }\n const origin = {x: (chartWidth/2), y: (chartHeight/2)};\n const orientation = props.showlegend === 'right' ? 'vertical' : 'horizontal';\n let legendData = pieData.map((d: {x: any, y: any}, index: number) => {\n return {\n name: this.state.xaxisDatakeyArr[d.x],\n color: this.state.colors[index % (this.state.colors.length)]\n };\n });\n return (\n <View style={[{opacity: this.state.opacity}, this.styles.root]}\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n onLayout={this.onViewLayoutChange}>\n <View onLayout={this.onInfoViewLayoutChange}>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\n {props.showlegend === 'top' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n <View style={{flexDirection: 'row', justifyContent: 'center', alignItems: 'center'}}>\n {this.getTooltip()}\n <View style={{flex: 1}}>\n {chartWidth ? (\n <Svg\n width={chartWidth}\n height={chartHeight}\n >\n <VictoryPie\n style={styleProp}\n standalone={false}\n colorScale={this.state.colors}\n labels={({datum}) => this.getLabel(datum, props)}\n endAngle={this.state.endAngle || 0}\n radius={radius}\n innerRadius={innerRadius}\n theme={this.state.theme}\n key={props.name}\n name={props.name}\n data={this.isRTL?pieData.toReversed():pieData}\n origin={origin}\n labelPlacement={props.labelplacement}\n labelRadius={labelRadius}\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 />\n <VictoryLabel\n textAnchor=\"middle\"\n style={this.styles.title as any}\n x={origin.x} y={origin.y}\n text={props.centerlabel}\n />\n </Svg>) : null}\n </View>\n {props.showlegend === 'right' ? \n (<View style={{maxWidth: '50%'}} onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}\n orientation='vertical'></Legend>\n </View>) : null }\n </View>\n {props.showlegend === 'bottom' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACtE,SAASC,GAAG,QAAQ,kBAAkB;AACtC,SAASC,uBAAuB,EAAEC,q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yB,gBAC7C5G,KAAA,CAAA+F,aAAA,CAAC/E,MAAM;MAACsC,IAAI,EAAEqC,UAAW;MACvBkB,SAAS,EAAE,IAAI,CAAC/B,MAAM,CAACgC,UAAW;MAClCC,QAAQ,EAAE,IAAI,CAACjC,MAAM,CAACkC;IAAW,CAAS,CACxC,CAAC,GAAI,IACT,CAAC;EAEX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","Platform","Svg","AccessibilityWidgetType","getAccessibilityProps","VictoryLabel","VictoryPie","WmPieChartProps","DEFAULT_CLASS","formatCompactNumber","WmIcon","BaseChartComponent","BaseChartComponentState","WmDonutChartProps","Legend","WmPieChartState","constructor","args","_defineProperty","WmPieChart","props","type","e","_e$nativeEvent","viewWidth","nativeEvent","layout","width","updateState","chartWidth","totalHeight","height","_e$nativeEvent2","infoHeight","opacity","_e$nativeEvent3","_e$nativeEvent4","legendWidth","legendHeight","componentDidMount","getLabel","d","labeltype","Math","round","y","state","total","xaxisDatakeyArr","x","onSelect","event","data","value","slice","label","datum","selectedItem","dataset","index","selectedChartItem","color","style","fill","_dataObj","setTooltipPosition","tooltipXaxis","tooltipYaxis","isTooltipOpen","invokeEventCallback","proxy","renderWidget","length","pieData","showlegend","chartHeight","styles","root","radius","min","innerRadius","donutratio","styleProp","labelRadius","showlabels","labels","display","origin","orientation","legendData","map","name","colors","createElement","_extends","LINECHART","onLayout","onViewLayoutChange","onInfoViewLayoutChange","flexDirection","alignItems","iconclass","icon","title","subHeading","subheading","onLegendViewLayoutChange","testStyle","legendText","dotStyle","legenedDot","justifyContent","getTooltip","flex","standalone","colorScale","endAngle","theme","key","isRTL","toReversed","labelPlacement","labelplacement","events","target","eventHandlers","OS","onClick","bind","onPress","textAnchor","centerLabel","text","centerlabel","maxWidth"],"sources":["pie-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Svg } from 'react-native-svg';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport { VictoryLabel, VictoryLegend, VictoryPie } from 'victory-native';\n\nimport WmPieChartProps from './pie-chart.props';\nimport { DEFAULT_CLASS, WmPieChartStyles } from './pie-chart.styles';\n\nimport { formatCompactNumber } from '@wavemaker/app-rn-runtime/core/utils';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from '@wavemaker/app-rn-runtime/components/chart/basechart.component';\nimport WmDonutChartProps from '@wavemaker/app-rn-runtime/components/chart/donut-chart/donut-chart.props';\nimport { Legend } from '../legend/legend.component';\n\n\nexport class WmPieChartState extends BaseChartComponentState<WmPieChartProps> {\n chartWidth = 0;\n totalHeight = 0;\n infoHeight = 10;\n legendWidth = 0;\n legendHeight = 0;\n opacity = 0;\n}\n\nexport default class WmPieChart extends BaseChartComponent<WmPieChartProps, WmPieChartState, WmPieChartStyles> {\n\n constructor(props: WmPieChartProps) {\n super(props, DEFAULT_CLASS, props.type === 'Donut' ? new WmDonutChartProps() : new WmPieChartProps(), new WmPieChartState());\n }\n\n componentDidMount() {\n super.componentDidMount();\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n this.updateState({\n chartWidth: viewWidth,\n totalHeight: e.nativeEvent?.layout.height\n } as WmPieChartState)\n }\n\n onInfoViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n infoHeight: e.nativeEvent?.layout.height,\n opacity: 1\n } as WmPieChartState);\n }\n\n onLegendViewLayoutChange = (e: LayoutChangeEvent) => {\n this.updateState({\n legendWidth: e.nativeEvent?.layout.width,\n legendHeight: e.nativeEvent?.layout.height\n } as WmPieChartState);\n }\n\n getLabel(d: {x: any, y: any}, props: WmPieChartProps): string {\n switch(props.labeltype) {\n case 'percent': {\n return Math.round(d.y * 100 /this.state.total) + '%';\n }\n case 'key': {\n return this.state.xaxisDatakeyArr[d.x];\n }\n case 'value': {\n return formatCompactNumber(d.y);\n }\n case 'key-value': {\n return this.state.xaxisDatakeyArr[d.x] + ' ' + d.y;\n }\n }\n }\n\n onSelect(event: any, data: any){\n let value = data.slice.value;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n let selectedChartItem = data.slice;\n selectedChartItem[\"data\"] = {x: label, y: value, color: data.style.fill, _dataObj: selectedItem}\n const nativeEvent = event.nativeEvent;\n this.setTooltipPosition(nativeEvent);\n this.updateState({\n tooltipXaxis: label,\n tooltipYaxis: value,\n isTooltipOpen: true,\n selectedItem: {...selectedItem, index: data.index},\n } as WmPieChartState)\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n }\n\n renderWidget(props: WmPieChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n } \n const pieData = this.state.data[0];\n const chartWidth = this.state.chartWidth \n - (props.showlegend === 'right' ? this.state.legendWidth : 0);\n const chartHeight = (this.styles.root.height ? this.state.totalHeight : chartWidth) \n - this.state.infoHeight \n - (props.showlegend === 'right' ? 0 : this.state.legendHeight);\n let radius = (Math.min(chartWidth, chartHeight) - 40)/ 2;\n let innerRadius = props.donutratio * radius;\n let styleProp = {};\n let labelRadius;\n if (props.showlabels === 'hide') {\n styleProp={labels: { display: \"none\" }};\n } else if (props.showlabels === 'inside') {\n labelRadius = radius/2;\n } else {\n labelRadius = radius + 8;\n }\n const origin = {x: (chartWidth/2), y: (chartHeight/2)};\n const orientation = props.showlegend === 'right' ? 'vertical' : 'horizontal';\n let legendData = pieData.map((d: {x: any, y: any}, index: number) => {\n return {\n name: this.state.xaxisDatakeyArr[d.x],\n color: this.state.colors[index % (this.state.colors.length)]\n };\n });\n return (\n <View style={[{opacity: this.state.opacity}, this.styles.root]}\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n onLayout={this.onViewLayoutChange}>\n <View onLayout={this.onInfoViewLayoutChange}>\n <View style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n <Text style={this.styles.title}>{props.title}</Text>\n </View>\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n </View>\n {props.showlegend === 'top' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n <View style={{flexDirection: 'row', justifyContent: 'center', alignItems: 'center'}}>\n {this.getTooltip()}\n <View style={{flex: 1}}>\n {chartWidth ? (\n <Svg\n width={chartWidth}\n height={chartHeight}\n >\n <VictoryPie\n style={styleProp}\n standalone={false}\n colorScale={this.state.colors}\n labels={({datum}) => this.getLabel(datum, props)}\n endAngle={this.state.endAngle || 0}\n radius={radius}\n innerRadius={innerRadius}\n theme={this.state.theme}\n key={props.name}\n name={props.name}\n data={this.isRTL?pieData.toReversed():pieData}\n origin={origin}\n labelPlacement={props.labelplacement}\n labelRadius={labelRadius}\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 />\n <VictoryLabel\n textAnchor=\"middle\"\n style={{ ...this.styles.centerLabel, fill: this.styles.centerLabel.color }}\n x={origin.x} y={origin.y}\n text={props.centerlabel}\n />\n </Svg>) : null}\n </View>\n {props.showlegend === 'right' ? \n (<View style={{maxWidth: '50%'}} onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}\n orientation='vertical'></Legend>\n </View>) : null }\n </View>\n {props.showlegend === 'bottom' ? \n (<View onLayout={this.onLegendViewLayoutChange}>\n <Legend data={legendData}\n testStyle={this.styles.legendText}\n dotStyle={this.styles.legenedDot}></Legend>\n </View>) : null }\n </View>\n );\n }\n}\n"],"mappings":";;;;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;MAClCC,QAAQ,EAAE,IAAI,CAACjC,MAAM,CAACkC,UAAW;MACjCtB,WAAW,EAAC;IAAU,CAAS,CAC7B,CAAC,GAAI,IACT,CAAC,EACNpE,KAAK,CAACsD,UAAU,KAAK,QAAQ,gBAC3B5E,KAAA,CAAA+F,aAAA,CAAC9F,IAAI;MAACiG,QAAQ,EAAE,IAAI,CAACU;IAAyB,gBAC7C5G,KAAA,CAAA+F,aAAA,CAAC/E,MAAM;MAACsC,IAAI,EAAEqC,UAAW;MACvBkB,SAAS,EAAE,IAAI,CAAC/B,MAAM,CAACgC,UAAW;MAClCC,QAAQ,EAAE,IAAI,CAACjC,MAAM,CAACkC;IAAW,CAAS,CACxC,CAAC,GAAI,IACT,CAAC;EAEX;AACF","ignoreList":[]}
@@ -131,24 +131,42 @@ export default class WmStackChart extends BaseChartComponent {
131
131
  }
132
132
  getArcChart(props) {
133
133
  if (this.state.data.length > 0) {
134
- let data = cloneDeep(this.state.data[0]);
135
- const colorScaleArray = this.getColorCodes();
136
- const maxValue = Math.max(...data.map(o => o.y));
137
- data = orderBy(data, 'y', 'desc');
134
+ let data = this.getData();
135
+ let negativeValues = cloneDeep(this.getNegativeValuesArray());
136
+ let currentValue = 0;
137
+ let prevValue = 0;
138
+ data = data.map((d, i) => {
139
+ d.y = d.y - currentValue;
140
+ prevValue = d.y;
141
+ d.y = Math.abs(d.y);
142
+ d.index = d.x;
143
+ currentValue = prevValue < 0 && i === negativeValues.length - 1 ? 0 : prevValue + currentValue;
144
+ return d;
145
+ });
146
+ data.reverse();
147
+ if (negativeValues.length > 1) {
148
+ const portionToReverse = data.slice(-negativeValues.length);
149
+ const reversedPortion = portionToReverse.reverse();
150
+ data = [...data.slice(0, -negativeValues.length), ...reversedPortion];
151
+ }
138
152
  const radius = Math.min(this.state.chartWidth / 2, this.state.chartHeight - 50);
153
+ const angles = data.map((d, i) => {
154
+ let total = data.reduce((sum, item) => sum + item.y, 0);
155
+ return Math.round(d.y / total * 160);
156
+ });
157
+ let startAngle = 80;
139
158
  return data.map((d, i) => {
140
159
  let d1 = [];
141
160
  d1.push(d);
142
- d1.push({
143
- x: d.x,
144
- y: maxValue - d.y
145
- });
161
+ if (i != 0) {
162
+ startAngle = startAngle - angles[i - 1] + angles[i - 1] / 10;
163
+ }
146
164
  return /*#__PURE__*/React.createElement(VictoryPie, {
147
165
  key: props.name + '_' + i,
148
166
  radius: radius,
149
- colorScale: [colorScaleArray[i], '#fff0'],
150
- startAngle: -80,
151
- endAngle: 80,
167
+ colorScale: [this.state.colors[d.index], '#fff0'],
168
+ startAngle: angles ? startAngle : -80,
169
+ endAngle: -80,
152
170
  cornerRadius: 100,
153
171
  standalone: false,
154
172
  origin: {
@@ -157,6 +175,14 @@ export default class WmStackChart extends BaseChartComponent {
157
175
  },
158
176
  innerRadius: radius - this.state.props.thickness,
159
177
  labels: [],
178
+ events: [{
179
+ target: 'data',
180
+ eventHandlers: Platform.OS == "web" ? {
181
+ onClick: this.onSelect.bind(this)
182
+ } : {
183
+ onPress: this.onSelect.bind(this)
184
+ }
185
+ }],
160
186
  data: d1
161
187
  });
162
188
  });