@wavemaker-ai/app-rn-runtime 1.0.0-rc.324 → 1.0.0-rc.328
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/advanced/offline-banner/offline-banner.component.js +68 -0
- package/components/advanced/offline-banner/offline-banner.component.js.map +1 -0
- package/components/advanced/offline-banner/offline-banner.props.js +12 -0
- package/components/advanced/offline-banner/offline-banner.props.js.map +1 -0
- package/components/advanced/offline-banner/offline-banner.styles.js +99 -0
- package/components/advanced/offline-banner/offline-banner.styles.js.map +1 -0
- package/components/advanced/webview/webview.component.js +2 -2
- package/components/advanced/webview/webview.component.js.map +1 -1
- package/components/advanced/webview/webview.props.js +1 -1
- package/components/advanced/webview/webview.props.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.component.js +156 -14
- package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.styles.js +0 -3
- package/components/basic/bottomsheet/bottomsheet.styles.js.map +1 -1
- package/components/basic/progress-circle/progress-circle.component.js +3 -1
- package/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- package/components/chart/area-chart/area-chart.component.js +86 -93
- package/components/chart/area-chart/area-chart.component.js.map +1 -1
- package/components/chart/area-chart/area-chart.props.js +2 -0
- package/components/chart/area-chart/area-chart.props.js.map +1 -1
- package/components/chart/bar-chart/bar-chart.component.js +79 -97
- package/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- package/components/chart/basechart.component.js +117 -96
- package/components/chart/basechart.component.js.map +1 -1
- package/components/chart/basechart.props.js +12 -0
- package/components/chart/basechart.props.js.map +1 -1
- package/components/chart/basechart.styles.js.map +1 -1
- package/components/chart/bubble-chart/bubble-chart.component.js +72 -70
- package/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- package/components/chart/bubble-chart/bubble-chart.props.js +1 -0
- package/components/chart/bubble-chart/bubble-chart.props.js.map +1 -1
- package/components/chart/line-chart/line-chart.component.js +105 -79
- package/components/chart/line-chart/line-chart.component.js.map +1 -1
- package/components/chart/pie-chart/pie-chart.component.js +70 -166
- package/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- package/components/chart/pie-chart/pie-chart.props.js +1 -0
- package/components/chart/pie-chart/pie-chart.props.js.map +1 -1
- package/components/container/accordion/accordionpane/accordionpane.component.js +6 -2
- package/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- package/components/container/container.component.js +27 -1
- package/components/container/container.component.js.map +1 -1
- package/components/container/container.props.js +7 -0
- package/components/container/container.props.js.map +1 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +25 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +1 -0
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
- package/components/container/tabs/tabheader/tabheader.component.js +5 -14
- package/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- package/components/container/tabs/tabheader/tabheader.props.js +0 -2
- package/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
- package/components/container/tabs/tabheader/tabheader.styles.js +1 -43
- package/components/container/tabs/tabheader/tabheader.styles.js.map +1 -1
- package/components/container/tabs/tabpane/tabpane.component.js +6 -2
- package/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- package/components/container/tabs/tabs.component.js +2 -6
- package/components/container/tabs/tabs.component.js.map +1 -1
- package/components/container/tabs/tabs.props.js +0 -2
- package/components/container/tabs/tabs.props.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.component.js +28 -5
- package/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.props.js +2 -0
- package/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- package/components/data/form/form-field/form-field.component.js +1 -0
- package/components/data/form/form-field/form-field.component.js.map +1 -1
- package/components/data/form/form-field/form-field.props.js +1 -0
- package/components/data/form/form-field/form-field.props.js.map +1 -1
- package/components/data/list/list-template/list-template.component.js +3 -0
- package/components/data/list/list-template/list-template.component.js.map +1 -1
- package/components/data/list/list.component.js +6 -4
- package/components/data/list/list.component.js.map +1 -1
- package/components/data/list/list.styles.js +1 -14
- package/components/data/list/list.styles.js.map +1 -1
- package/components/input/baseinput/baseinput.component.js +7 -0
- package/components/input/baseinput/baseinput.component.js.map +1 -1
- package/components/input/calendar/calendar.component.js +4 -0
- package/components/input/calendar/calendar.component.js.map +1 -1
- package/components/input/calendar/views/month-view.js +8 -1
- package/components/input/calendar/views/month-view.js.map +1 -1
- package/components/input/checkboxset/checkboxset.component.js.map +1 -1
- package/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- package/components/input/chips/chips.component.js +3 -4
- package/components/input/chips/chips.component.js.map +1 -1
- package/components/input/chips/chips.styles.js +1 -2
- package/components/input/chips/chips.styles.js.map +1 -1
- package/components/input/currency/currency.component.js +1 -0
- package/components/input/currency/currency.component.js.map +1 -1
- package/components/input/number/number.component.js +1 -0
- package/components/input/number/number.component.js.map +1 -1
- package/components/input/switch/switch.component.js +2 -16
- package/components/input/switch/switch.component.js.map +1 -1
- package/components/input/switch/switch.props.js +0 -1
- package/components/input/switch/switch.props.js.map +1 -1
- package/components/input/switch/switch.styles.js +0 -19
- package/components/input/switch/switch.styles.js.map +1 -1
- package/components/input/text/text.component.js +14 -3
- package/components/input/text/text.component.js.map +1 -1
- package/components/input/text/text.props.js +1 -0
- package/components/input/text/text.props.js.map +1 -1
- package/components/input/text/text.styles.js +3 -1
- package/components/input/text/text.styles.js.map +1 -1
- package/components/input/textarea/textarea.component.js +3 -2
- package/components/input/textarea/textarea.component.js.map +1 -1
- package/components/input/toggle/toggle.component.js +4 -13
- package/components/input/toggle/toggle.component.js.map +1 -1
- package/components/input/toggle/toggle.props.js +1 -3
- package/components/input/toggle/toggle.props.js.map +1 -1
- package/components/input/toggle/toggle.styles.js +4 -12
- package/components/input/toggle/toggle.styles.js.map +1 -1
- package/components/navigation/appnavbar/appnavbar.props.js +1 -1
- package/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- package/components/page/page-content/page-content.component.js +3 -0
- package/components/page/page-content/page-content.component.js.map +1 -1
- package/components/page/page-content/page-content.props.js +2 -0
- package/components/page/page-content/page-content.props.js.map +1 -1
- package/components/page/page.component.js +95 -2
- package/components/page/page.component.js.map +1 -1
- package/components/page/page.props.js +3 -0
- package/components/page/page.props.js.map +1 -1
- package/components/page/tabbar/tabbar.component.js +3 -2
- package/components/page/tabbar/tabbar.component.js.map +1 -1
- package/components/page/tabbar/tabbar.props.js +1 -0
- package/components/page/tabbar/tabbar.props.js.map +1 -1
- package/components-prism/basic/search/search.component.js +8 -12
- package/components-prism/basic/search/search.component.js.map +1 -1
- package/components-prism/basic/search/search.props.js +1 -1
- package/components-prism/basic/search/search.props.js.map +1 -1
- package/components-prism/basic/search/search.styles.js +60 -25
- package/components-prism/basic/search/search.styles.js.map +1 -1
- package/core/AppConfig.js.map +1 -1
- package/core/accessibility.js +9 -0
- package/core/accessibility.js.map +1 -1
- package/core/auto-layout-host.component.js +8 -2
- package/core/auto-layout-host.component.js.map +1 -1
- package/core/auto-layout.utils.js +59 -0
- package/core/auto-layout.utils.js.map +1 -1
- package/core/base.component.js +22 -1
- package/core/base.component.js.map +1 -1
- package/core/components/floatinglabel.component.js +5 -2
- package/core/components/floatinglabel.component.js.map +1 -1
- package/core/components/textinput.component.js +3 -0
- package/core/components/textinput.component.js.map +1 -1
- package/core/network.service.js.map +1 -1
- package/core/tappable.component.js +109 -15
- package/core/tappable.component.js.map +1 -1
- package/npm-shrinkwrap.json +2835 -5858
- package/package-lock.json +2835 -5858
- package/package.json +25 -18
- package/runtime/base-fragment.component.js +7 -1
- package/runtime/base-fragment.component.js.map +1 -1
- package/runtime/base-page.component.js +24 -0
- package/runtime/base-page.component.js.map +1 -1
- package/runtime/base-partial.component.js.map +1 -1
- package/runtime/navigator/drawer.navigator.js +1 -0
- package/runtime/navigator/drawer.navigator.js.map +1 -1
- package/runtime/navigator/stack.navigator.js +16 -1
- package/runtime/navigator/stack.navigator.js.map +1 -1
- package/runtime/services/device/scan-service.js +12 -34
- package/runtime/services/device/scan-service.js.map +1 -1
- package/styles/theme.variables.js.map +1 -1
- package/variables/http.service.js +6 -1
- package/variables/http.service.js.map +1 -1
- package/variables/interceptor/intercept-context.impl.js +46 -0
- package/variables/interceptor/intercept-context.impl.js.map +1 -0
- package/variables/interceptor/interceptor.factory.js +78 -0
- package/variables/interceptor/interceptor.factory.js.map +1 -0
- package/variables/interceptor/persistent.storage.js +142 -0
- package/variables/interceptor/persistent.storage.js.map +1 -0
- package/variables/interceptor/service-variable-interceptor.js +52 -0
- package/variables/interceptor/service-variable-interceptor.js.map +1 -0
- package/variables/service-variable.js +109 -1
- package/variables/service-variable.js.map +1 -1
|
@@ -3,15 +3,12 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { Defs, LinearGradient, Stop } from 'react-native-svg';
|
|
9
|
-
import { VictoryArea, VictoryChart, VictoryStack, VictoryScatter, VictoryGroup } from "victory-native";
|
|
6
|
+
import { View, Text } from 'react-native';
|
|
7
|
+
import { AreaChart } from '@wavemaker/react-native-echarts';
|
|
10
8
|
import WmAreaChartProps from './area-chart.props';
|
|
11
9
|
import { DEFAULT_CLASS } from './area-chart.styles';
|
|
12
10
|
import { BaseChartComponent, BaseChartComponentState } from "@wavemaker-ai/app-rn-runtime/components/chart/basechart.component";
|
|
13
11
|
import WmIcon from "@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component";
|
|
14
|
-
import { isNumber } from 'lodash-es';
|
|
15
12
|
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';
|
|
16
13
|
export class WmAreaChartState extends BaseChartComponentState {
|
|
17
14
|
constructor(...args) {
|
|
@@ -19,6 +16,15 @@ export class WmAreaChartState extends BaseChartComponentState {
|
|
|
19
16
|
_defineProperty(this, "chartWidth", 0);
|
|
20
17
|
}
|
|
21
18
|
}
|
|
19
|
+
|
|
20
|
+
/** Maps Victory interpolation strings to ECharts AreaChart curve types. */
|
|
21
|
+
const getAreaType = interpolation => {
|
|
22
|
+
if (interpolation === 'cardinal') return 'smooth';
|
|
23
|
+
if (interpolation === 'step') return 'step';
|
|
24
|
+
return 'default'; // 'linear' and anything else
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// Migrated from victory-native <VictoryChart> + <VictoryArea> → <AreaChart>
|
|
22
28
|
export default class WmAreaChart extends BaseChartComponent {
|
|
23
29
|
constructor(props) {
|
|
24
30
|
super(props, DEFAULT_CLASS, new WmAreaChartProps(), new WmAreaChartState());
|
|
@@ -29,52 +35,56 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
29
35
|
chartWidth: viewWidth
|
|
30
36
|
});
|
|
31
37
|
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
series: 0,
|
|
45
|
-
x: data.index,
|
|
46
|
-
y: value,
|
|
38
|
+
_defineProperty(this, "onSelect", event => {
|
|
39
|
+
if (!this.state.props.dataset) return;
|
|
40
|
+
const {
|
|
41
|
+
dataIndex,
|
|
42
|
+
y,
|
|
43
|
+
seriesIndex
|
|
44
|
+
} = event;
|
|
45
|
+
const selectedItem = this.props.dataset[dataIndex];
|
|
46
|
+
const selectedChartItem = [{
|
|
47
|
+
series: seriesIndex,
|
|
48
|
+
x: dataIndex,
|
|
49
|
+
y,
|
|
47
50
|
_dataObj: selectedItem
|
|
48
|
-
},
|
|
51
|
+
}, dataIndex];
|
|
49
52
|
this.updateState({
|
|
50
|
-
tooltipXaxis: label,
|
|
51
|
-
tooltipYaxis: value,
|
|
52
|
-
isTooltipOpen: true,
|
|
53
53
|
selectedItem: {
|
|
54
54
|
...selectedItem,
|
|
55
|
-
index:
|
|
56
|
-
}
|
|
57
|
-
tooltipXPosition: tooltipX - this.state.tooltipoffsetx,
|
|
58
|
-
tooltipYPosition: tooltipY - this.state.tooltipoffsety
|
|
55
|
+
index: dataIndex
|
|
56
|
+
}
|
|
59
57
|
});
|
|
60
|
-
this.invokeEventCallback('onSelect', [
|
|
58
|
+
this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);
|
|
61
59
|
});
|
|
62
60
|
}
|
|
63
61
|
renderWidget(props) {
|
|
64
|
-
var _this$state$data, _this$
|
|
62
|
+
var _this$state$data, _this$state$colors, _props$tooltip;
|
|
65
63
|
this.invokeEventCallback('onBeforerender', [this.proxy, null]);
|
|
66
64
|
if (!((_this$state$data = this.state.data) !== null && _this$state$data !== void 0 && _this$state$data.length)) {
|
|
67
65
|
return null;
|
|
68
66
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
};
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
67
|
+
const chartData = this.state.data.map((series, i) => ({
|
|
68
|
+
name: this.state.yAxis[i],
|
|
69
|
+
data: series.map(pt => pt.y)
|
|
70
|
+
}));
|
|
71
|
+
const type = getAreaType(props.interpolation);
|
|
72
|
+
// step sub-mode: only relevant when curve type resolves to 'step'
|
|
73
|
+
// const step: 'start' | 'middle' | 'end' | false =
|
|
74
|
+
// type === 'step'
|
|
75
|
+
// ? props.step === false
|
|
76
|
+
// ? false
|
|
77
|
+
// : (props.step ?? 'start')
|
|
78
|
+
// : false;
|
|
79
|
+
|
|
80
|
+
const showLegend = props.showlegend !== 'hide';
|
|
81
|
+
const legendPosition = ['top', 'bottom', 'left', 'right'].includes(props.showlegend) ? props.showlegend : 'bottom';
|
|
82
|
+
const minDomain = this.getMinDomain();
|
|
83
|
+
const series = ((_this$state$colors = this.state.colors) !== null && _this$state$colors !== void 0 && _this$state$colors.length ? this.state.colors : ['#000']).map(color => ({
|
|
84
|
+
color,
|
|
85
|
+
lineWidth: props.linethickness
|
|
86
|
+
}));
|
|
87
|
+
const symbol = this.getSeriesSymbol(props.highlightpoints, props.ticksymbol);
|
|
78
88
|
return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
|
|
79
89
|
style: this.styles.root,
|
|
80
90
|
onLayout: this.onViewLayoutChange.bind(this),
|
|
@@ -94,66 +104,49 @@ export default class WmAreaChart extends BaseChartComponent {
|
|
|
94
104
|
style: this.styles.subHeading
|
|
95
105
|
}, props.subheading) : null), this.state.chartWidth ? /*#__PURE__*/React.createElement(View, {
|
|
96
106
|
ref: this.viewRef
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
height: this.styles.root.height,
|
|
107
|
+
}, /*#__PURE__*/React.createElement(AreaChart, {
|
|
108
|
+
data: chartData,
|
|
100
109
|
width: this.state.chartWidth || this.screenWidth,
|
|
101
|
-
|
|
110
|
+
height: this.styles.root.height,
|
|
111
|
+
colors: this.state.colors,
|
|
112
|
+
theme: this.getChartTheme(false, series),
|
|
113
|
+
type: type,
|
|
114
|
+
step: props.stepposition,
|
|
115
|
+
stackNormalize: props.stacknormalize,
|
|
116
|
+
symbol: symbol,
|
|
117
|
+
symbolSize: props.symbolsize,
|
|
118
|
+
areaFill: props.areafill,
|
|
119
|
+
areaOpacity: props.areaopacity,
|
|
120
|
+
minY: minDomain.y
|
|
121
|
+
// maxY={this.state.chartMaxY}
|
|
122
|
+
,
|
|
123
|
+
minX: minDomain.x,
|
|
124
|
+
maxX: this.state.chartMaxX,
|
|
125
|
+
grid: {
|
|
102
126
|
top: props.offsettop,
|
|
103
127
|
bottom: props.offsetbottom,
|
|
104
128
|
left: this.isRTL ? props.offsetright : props.offsetleft,
|
|
105
129
|
right: this.isRTL ? props.offsetleft : props.offsetright
|
|
106
130
|
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
name: props.name + '_' + i,
|
|
127
|
-
style: {
|
|
128
|
-
data: {
|
|
129
|
-
fill: `url(#${chartName}Gradient${i})`,
|
|
130
|
-
stroke: this.state.colors[i],
|
|
131
|
-
strokeWidth: props.linethickness
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
data: d
|
|
135
|
-
}), /*#__PURE__*/React.createElement(VictoryScatter, {
|
|
136
|
-
size: 5,
|
|
137
|
-
key: props.name + '_scatter' + i,
|
|
138
|
-
style: {
|
|
139
|
-
data: props.highlightpoints ? {
|
|
140
|
-
fill: this.state.colors[i],
|
|
141
|
-
opacity: 0.8
|
|
142
|
-
} : {
|
|
143
|
-
opacity: 0
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
data: d,
|
|
147
|
-
events: [{
|
|
148
|
-
target: 'data',
|
|
149
|
-
eventHandlers: Platform.OS == "web" ? {
|
|
150
|
-
onClick: this.onSelect.bind(this)
|
|
151
|
-
} : {
|
|
152
|
-
onPress: this.onSelect.bind(this)
|
|
153
|
-
}
|
|
154
|
-
}]
|
|
155
|
-
}));
|
|
156
|
-
})))) : null);
|
|
131
|
+
showXAxis: props.showxaxis !== false,
|
|
132
|
+
showXAxisTicks: props.showxaxisticks,
|
|
133
|
+
showYAxis: props.showyaxis !== false,
|
|
134
|
+
showYAxisTicks: props.showyaxisticks,
|
|
135
|
+
showXAxisSplitLines: !props.hidegridxaxis,
|
|
136
|
+
showYAxisSplitLines: !props.hidegridyaxis,
|
|
137
|
+
xAxisLabel: this.state.xLabel || '',
|
|
138
|
+
yAxisLabel: this.state.yLabel || '',
|
|
139
|
+
xAxisTickLabelFormatter: this.getXAxisTickLabelFormatter(),
|
|
140
|
+
yAxisTickLabelFormatter: this.getYAxisTickLabelFormatter(),
|
|
141
|
+
showLegend: showLegend,
|
|
142
|
+
legendPosition: legendPosition,
|
|
143
|
+
tooltip: props.tooltips ? this.hasCustomTooltip ? 'none' : (_props$tooltip = props.tooltip) !== null && _props$tooltip !== void 0 ? _props$tooltip : 'card' : 'none',
|
|
144
|
+
renderTooltip: this.getRenderTooltip(),
|
|
145
|
+
showHighlighter: this.props.showhighlighter,
|
|
146
|
+
onSelect: this.onSelect,
|
|
147
|
+
intervalX: props.intervalx,
|
|
148
|
+
intervalY: props.intervaly
|
|
149
|
+
})) : null);
|
|
157
150
|
}
|
|
158
151
|
}
|
|
159
152
|
//# sourceMappingURL=area-chart.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Color","View","Text","Platform","Defs","LinearGradient","Stop","VictoryArea","VictoryChart","VictoryStack","VictoryScatter","VictoryGroup","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmIcon","isNumber","AccessibilityWidgetType","getAccessibilityProps","WmAreaChartState","constructor","args","_defineProperty","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","handleLayout","updateState","chartWidth","onSelect","event","data","viewRef","current","state","dataset","measureInWindow","chartX","chartY","value","index","y","label","xaxisDatakeyArr","datum","x","selectedItem","tooltipX","pageX","tooltipY","pageY","selectedChartItem","series","_dataObj","tooltipXaxis","tooltipYaxis","isTooltipOpen","tooltipXPosition","tooltipoffsetx","tooltipYPosition","tooltipoffsety","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$props$name","length","mindomain","xdomain","chartMinX","undefined","ydomain","chartMinY","chartName","name","gradientStop","chartMaxY","createElement","_extends","LINECHART","style","styles","root","onLayout","onViewLayoutChange","bind","key","title","iconclass","testID","flexDirection","alignItems","icon","subheading","subHeading","ref","getTooltip","theme","height","screenWidth","padding","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","minDomain","getLegendView","getXaxis","getYAxis","map","d","i","id","x1","y1","x2","y2","offset","stopColor","colors","lighten","rgb","toString","interpolation","fill","stroke","strokeWidth","linethickness","size","highlightpoints","opacity","events","target","eventHandlers","OS","onClick","onPress"],"sources":["area-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport Color from \"color\";\nimport { LayoutChangeEvent, View, Text, Platform } from 'react-native';\nimport { Defs, LinearGradient, Stop, Svg } from 'react-native-svg';\nimport { VictoryArea, VictoryLine, VictoryChart, VictoryLegend, VictoryStack, VictoryScatter, VictoryGroup } from \"victory-native\";\nimport { InterpolationPropType } from 'victory-core';\nimport WmAreaChartProps from './area-chart.props';\nimport { DEFAULT_CLASS, WmAreaChartStyles } from './area-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmIcon from \"@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component\";\n\nimport ThemeVariables from '@wavemaker-ai/app-rn-runtime/styles/theme.variables';\nimport { isNil, isNumber } from 'lodash-es';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport { isWebPreviewMode } from '@wavemaker-ai/app-rn-runtime/core/utils';\n\nexport class WmAreaChartState extends BaseChartComponentState<WmAreaChartProps> {\n chartWidth = 0;\n}\n\nexport default class WmAreaChart extends BaseChartComponent<WmAreaChartProps, WmAreaChartState, WmAreaChartStyles> {\n\n constructor(props: WmAreaChartProps) {\n super(props, DEFAULT_CLASS, new WmAreaChartProps(), new WmAreaChartState());\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n\n this.handleLayout(e);\n\n this.updateState({\n chartWidth: viewWidth\n } as WmAreaChartState)\n }\n\n onSelect(event: any, data: any){\n if (!this.viewRef.current) return;\n if (!this.state.props.dataset) return;\n this.viewRef.current.measureInWindow((chartX: number, chartY: number) => {\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n const nativeEvent = event.nativeEvent;\n let tooltipX = nativeEvent.pageX - chartX;\n let tooltipY = nativeEvent.pageY - chartY;\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.updateState({\n tooltipXaxis: label,\n tooltipYaxis: value,\n isTooltipOpen: true,\n selectedItem: {...selectedItem, index: data.index},\n tooltipXPosition: tooltipX - this.state.tooltipoffsetx,\n tooltipYPosition: tooltipY - this.state.tooltipoffsety\n } as WmAreaChartState)\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n });\n }\n\n renderWidget(props: WmAreaChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n let mindomain={\n x: props.xdomain === 'Min' ? this.state.chartMinX: undefined,\n y: props.ydomain === 'Min' ? this.state.chartMinY: undefined\n };\n const chartName = this.props.name ?? 'nonameAreachart';\n let gradientStop = '100%';\n if (isNumber(this.state.chartMaxY) && isNumber(this.state.chartMinY) && this.state.chartMaxY > 0) {\n gradientStop = (this.state.chartMaxY - this.state.chartMinY) * 100 / this.state.chartMaxY + '%';\n }\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n key={`${props.title}_area_chart`}\n >\n <View>\n { (props.title || props.iconclass) ? (\n <View testID=\"title-icon-container\" style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null }\n </View>\n ) : null }\n { props.subheading? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text> ) : null }\n </View>\n {this.state.chartWidth ?\n (\n <View ref={this.viewRef}>\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: this.isRTL ? props.offsetright : props.offsetleft, right: this.isRTL ? props.offsetleft : props.offsetright }}\n minDomain={mindomain}\n >\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n <VictoryStack>\n {\n this.state.data.map((d: any, i: number) => {\n return <VictoryGroup key={props.name + '_area_group_' + i}>\n <Defs>\n <LinearGradient id={`${chartName}Gradient${i}`} x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n <Stop offset=\"0%\" stopColor={Color(this.state.colors[i]).lighten(0.2).rgb().toString()}/>\n <Stop offset={gradientStop} stopColor={Color(this.state.colors[i]).lighten(0.6).rgb().toString()}/>\n </LinearGradient>\n </Defs>\n <VictoryArea\n interpolation={props.interpolation as InterpolationPropType}\n key={props.name + '_' + i}\n name={props.name + '_' + i}\n style={{\n data: {\n fill: `url(#${chartName}Gradient${i})`,\n stroke: this.state.colors[i],\n strokeWidth: props.linethickness,\n }\n }}\n data={d}\n />\n <VictoryScatter\n size={5}\n key={props.name + '_scatter' + i}\n style={{\n data: props.highlightpoints ? {fill: this.state.colors[i], opacity: 0.8}:{opacity: 0}\n }}\n data={d}\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 </VictoryGroup>\n })\n }\n </VictoryStack>\n </Victo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M;UACdC,aAAa,EAAE5I,QAAQ,CAAC6I,EAAE,IAAI,KAAK,GAAG;YACpCC,OAAO,EAAE,IAAI,CAAC/G,QAAQ,CAACwD,IAAI,CAAC,IAAI;UAClC,CAAC,GAAC;YACAwD,OAAO,EAAE,IAAI,CAAChH,QAAQ,CAACwD,IAAI,CAAC,IAAI;UAClC;QACF,CAAC;MAAE,CACF,CACO,CAAC;IACjB,CAAC,CAEW,CACF,CACR,CAAC,GAET,IACE,CAAC;EACT;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","View","Text","AreaChart","WmAreaChartProps","DEFAULT_CLASS","BaseChartComponent","BaseChartComponentState","WmIcon","AccessibilityWidgetType","getAccessibilityProps","WmAreaChartState","constructor","args","_defineProperty","getAreaType","interpolation","WmAreaChart","props","e","viewWidth","nativeEvent","layout","width","handleLayout","updateState","chartWidth","event","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","index","invokeEventCallback","proxy","renderWidget","_this$state$data","_this$state$colors","_props$tooltip","data","length","chartData","map","i","name","yAxis","pt","type","showLegend","showlegend","legendPosition","includes","minDomain","getMinDomain","colors","color","lineWidth","linethickness","symbol","getSeriesSymbol","highlightpoints","ticksymbol","createElement","_extends","LINECHART","style","styles","root","onLayout","onViewLayoutChange","bind","key","title","iconclass","testID","flexDirection","alignItems","icon","subheading","subHeading","ref","viewRef","screenWidth","height","theme","getChartTheme","step","stepposition","stackNormalize","stacknormalize","symbolSize","symbolsize","areaFill","areafill","areaOpacity","areaopacity","minY","minX","maxX","chartMaxX","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxis","showxaxis","showXAxisTicks","showxaxisticks","showYAxis","showyaxis","showYAxisTicks","showyaxisticks","showXAxisSplitLines","hidegridxaxis","showYAxisSplitLines","hidegridyaxis","xAxisLabel","xLabel","yAxisLabel","yLabel","xAxisTickLabelFormatter","getXAxisTickLabelFormatter","yAxisTickLabelFormatter","getYAxisTickLabelFormatter","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect","intervalX","intervalx","intervalY","intervaly"],"sources":["area-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, View, Text } from 'react-native';\nimport { AreaChart, CartesianChartSelectEvent } from '@wavemaker/react-native-echarts';\nimport WmAreaChartProps from './area-chart.props';\nimport { DEFAULT_CLASS, WmAreaChartStyles } from './area-chart.styles';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmIcon from \"@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component\";\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport isEmpty from 'lodash-es/isEmpty';\n\nexport class WmAreaChartState extends BaseChartComponentState<WmAreaChartProps> {\n chartWidth = 0;\n}\n\n/** Maps Victory interpolation strings to ECharts AreaChart curve types. */\nconst getAreaType = (interpolation: string): 'default' | 'smooth' | 'step' => {\n if (interpolation === 'cardinal') return 'smooth';\n if (interpolation === 'step') return 'step';\n return 'default'; // 'linear' and anything else\n};\n\n\n// Migrated from victory-native <VictoryChart> + <VictoryArea> → <AreaChart>\nexport default class WmAreaChart extends BaseChartComponent<WmAreaChartProps, WmAreaChartState, WmAreaChartStyles> {\n\n constructor(props: WmAreaChartProps) {\n super(props, DEFAULT_CLASS, new WmAreaChartProps(), new WmAreaChartState());\n }\n\n onViewLayoutChange = (e: LayoutChangeEvent) => {\n let viewWidth = e.nativeEvent.layout.width;\n\n this.handleLayout(e);\n\n this.updateState({\n chartWidth: viewWidth\n } as WmAreaChartState);\n }\n\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmAreaChartState);\n this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);\n}\n\n renderWidget(props: WmAreaChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number }) => pt.y),\n }));\n\n const type = getAreaType(props.interpolation);\n // step sub-mode: only relevant when curve type resolves to 'step'\n // const step: 'start' | 'middle' | 'end' | false =\n // type === 'step'\n // ? props.step === false\n // ? false\n // : (props.step ?? 'start')\n // : false;\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n lineWidth: props.linethickness,\n }));\n const symbol = this.getSeriesSymbol(props.highlightpoints, props.ticksymbol);\n\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n key={`${props.title}_area_chart`}\n >\n <View>\n { (props.title || props.iconclass) ? (\n <View testID=\"title-icon-container\" style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null }\n </View>\n ) : null }\n { props.subheading? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text> ) : null }\n </View>\n {this.state.chartWidth ?\n (\n <View ref={this.viewRef}>\n <AreaChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(false, series)}\n type={type}\n step={props.stepposition}\n stackNormalize={props.stacknormalize}\n symbol={symbol}\n symbolSize={props.symbolsize}\n areaFill={props.areafill}\n areaOpacity={props.areaopacity}\n minY={minDomain.y}\n // maxY={this.state.chartMaxY}\n minX={minDomain.x}\n maxX={this.state.chartMaxX}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={props.showxaxis !== false}\n showXAxisTicks={props.showxaxisticks}\n showYAxis={props.showyaxis !== false}\n showYAxisTicks={props.showyaxisticks}\n showXAxisSplitLines={!props.hidegridxaxis}\n showYAxisSplitLines={!props.hidegridyaxis}\n xAxisLabel={this.state.xLabel || ''}\n yAxisLabel={this.state.yLabel || ''}\n xAxisTickLabelFormatter={this.getXAxisTickLabelFormatter()}\n yAxisTickLabelFormatter={this.getYAxisTickLabelFormatter()}\n showLegend={showLegend}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={this.props.showhighlighter}\n onSelect={this.onSelect}\n intervalX={props.intervalx}\n intervalY={props.intervaly}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,SAAS,QAAmC,iCAAiC;AACtF,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,MAAM,MAAM,mEAAmE;AACtF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAGhH,OAAO,MAAMC,gBAAgB,SAASJ,uBAAuB,CAAmB;EAAAK,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAA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,KAAK,CAAC+F;MAC/C,CAAE;MACFG,SAAS,EAAElG,KAAK,CAACmG,SAAS,KAAK,KAAM;MACrCC,cAAc,EAAEpG,KAAK,CAACqG,cAAe;MACrCC,SAAS,EAAEtG,KAAK,CAACuG,SAAS,KAAK,KAAM;MACrCC,cAAc,EAAExG,KAAK,CAACyG,cAAe;MACrCC,mBAAmB,EAAE,CAAC1G,KAAK,CAAC2G,aAAc;MAC1CC,mBAAmB,EAAE,CAAC5G,KAAK,CAAC6G,aAAc;MAC1CC,UAAU,EAAE,IAAI,CAACpG,KAAK,CAACqG,MAAM,IAAI,EAAG;MACpCC,UAAU,EAAE,IAAI,CAACtG,KAAK,CAACuG,MAAM,IAAI,EAAG;MACpCC,uBAAuB,EAAE,IAAI,CAACC,0BAA0B,CAAC,CAAE;MAC3DC,uBAAuB,EAAE,IAAI,CAACC,0BAA0B,CAAC,CAAE;MAC3DjF,UAAU,EAAEA,UAAW;MACvBE,cAAc,EAAEA,cAAe;MAC/BgF,OAAO,EAAEtH,KAAK,CAACuH,QAAQ,GAAI,IAAI,CAACC,gBAAgB,GAAG,MAAM,IAAA9F,cAAA,GAAI1B,KAAK,CAACsH,OAAO,cAAA5F,cAAA,cAAAA,cAAA,GAAI,MAAO,GAAI,MAAO;MAChG+F,aAAa,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAE;MACvCC,eAAe,EAAE,IAAI,CAAC3H,KAAK,CAAC4H,eAAgB;MAC5CC,QAAQ,EAAE,IAAI,CAACA,QAAS;MACxBC,SAAS,EAAE9H,KAAK,CAAC+H,SAAU;MAC3BC,SAAS,EAAEhI,KAAK,CAACiI;IAAU,CAC5B,CACG,CAAC,GACL,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
|
@@ -7,6 +7,8 @@ export default class WmAreaChartProps extends BaseChartComponentProps {
|
|
|
7
7
|
super(...args);
|
|
8
8
|
_defineProperty(this, "linethickness", 2);
|
|
9
9
|
_defineProperty(this, "onSelect", void 0);
|
|
10
|
+
_defineProperty(this, "areafill", 'gradient');
|
|
11
|
+
_defineProperty(this, "areaopacity", 0.6);
|
|
10
12
|
}
|
|
11
13
|
}
|
|
12
14
|
//# sourceMappingURL=area-chart.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseChartComponentProps","WmAreaChartProps","constructor","args","_defineProperty"],"sources":["area-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.props\";\n\nexport default class WmAreaChartProps extends BaseChartComponentProps {\n
|
|
1
|
+
{"version":3,"names":["BaseChartComponentProps","WmAreaChartProps","constructor","args","_defineProperty"],"sources":["area-chart.props.ts"],"sourcesContent":["import BaseChartComponentProps from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.props\";\n\nexport default class WmAreaChartProps extends BaseChartComponentProps {\n linethickness: number = 2;\n onSelect?: any;\n areafill?: 'gradient' | 'transparent' | 'solid' = 'gradient';\n areaopacity?: number = 0.6;\n}\n"],"mappings":";;;AAAA,OAAOA,uBAAuB,MAAM,+DAA+D;AAEnG,eAAe,MAAMC,gBAAgB,SAASD,uBAAuB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,wBAC5C,CAAC;IAAAA,eAAA;IAAAA,eAAA,mBAEyB,UAAU;IAAAA,eAAA,sBACrC,GAAG;EAAA;AAC5B","ignoreList":[]}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2
5
|
import React from 'react';
|
|
3
|
-
import { View, Text
|
|
6
|
+
import { View, Text } from 'react-native';
|
|
7
|
+
import { ColumnChart } from '@wavemaker/react-native-echarts';
|
|
4
8
|
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';
|
|
5
|
-
import { VictoryChart, VictoryBar, VictoryStack, VictoryGroup } from "victory-native";
|
|
6
9
|
import { BaseChartComponent, BaseChartComponentState } from "@wavemaker-ai/app-rn-runtime/components/chart/basechart.component";
|
|
7
10
|
import WmBarChartProps from './bar-chart.props';
|
|
8
11
|
import { DEFAULT_CLASS } from './bar-chart.styles';
|
|
@@ -11,99 +14,55 @@ export class WmBarChartState extends BaseChartComponentState {}
|
|
|
11
14
|
export default class WmBarChart extends BaseChartComponent {
|
|
12
15
|
constructor(props) {
|
|
13
16
|
super(props, DEFAULT_CLASS, new WmBarChartProps(), new WmBarChartState());
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
alignment: this.isRTL ? 'end' : 'start',
|
|
28
|
-
style: props.customcolors ? {
|
|
29
|
-
data: {
|
|
30
|
-
fill: isNested ? this.state.colors[i % this.state.colors.length] : ({
|
|
31
|
-
datum
|
|
32
|
-
}) => {
|
|
33
|
-
var _this$state$colors$da;
|
|
34
|
-
return (_this$state$colors$da = this.state.colors[datum.x]) !== null && _this$state$colors$da !== void 0 ? _this$state$colors$da : this.state.colors[datum.x % this.state.colors.length];
|
|
35
|
-
},
|
|
36
|
-
stroke: isNested ? this.state.colors[i % this.state.colors.length] : ({
|
|
37
|
-
datum
|
|
38
|
-
}) => {
|
|
39
|
-
var _this$state$colors$da2;
|
|
40
|
-
return (_this$state$colors$da2 = this.state.colors[datum.x]) !== null && _this$state$colors$da2 !== void 0 ? _this$state$colors$da2 : this.state.colors[datum.x % this.state.colors.length];
|
|
41
|
-
},
|
|
42
|
-
strokeWidth: props.showzerothvalue ? 3 : 0
|
|
43
|
-
}
|
|
44
|
-
} : {
|
|
45
|
-
data: {
|
|
46
|
-
strokeWidth: props.showzerothvalue ? 3 : 0
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
cornerRadius: {
|
|
50
|
-
topLeft: this.styles.bar.borderTopLeftRadius,
|
|
51
|
-
topRight: this.styles.bar.borderTopRightRadius,
|
|
52
|
-
bottomLeft: this.styles.bar.borderBottomLeftRadius,
|
|
53
|
-
bottomRight: this.styles.bar.borderBottomRightRadius
|
|
54
|
-
},
|
|
55
|
-
events: [{
|
|
56
|
-
target: 'data',
|
|
57
|
-
eventHandlers: Platform.OS == "web" ? {
|
|
58
|
-
onClick: this.onSelect.bind(this)
|
|
59
|
-
} : {
|
|
60
|
-
onPress: this.onSelect.bind(this)
|
|
61
|
-
}
|
|
62
|
-
}]
|
|
63
|
-
}, props.barwidth ? {
|
|
64
|
-
barWidth: props.barwidth
|
|
65
|
-
} : {}));
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
onSelect(event, data) {
|
|
69
|
-
if (!this.viewRef.current) return;
|
|
70
|
-
if (!this.state.props.dataset) return;
|
|
71
|
-
this.viewRef.current.measureInWindow((chartX, chartY) => {
|
|
72
|
-
let value = data.data[data.index].y;
|
|
73
|
-
let label = this.state.xaxisDatakeyArr[data.datum.x];
|
|
74
|
-
let selectedItem = this.props.dataset[data.index];
|
|
75
|
-
const nativeEvent = event.nativeEvent;
|
|
76
|
-
let tooltipX = nativeEvent.pageX - chartX;
|
|
77
|
-
let tooltipY = nativeEvent.pageY - chartY;
|
|
78
|
-
let selectedChartItem = [{
|
|
79
|
-
series: 0,
|
|
80
|
-
x: data.index,
|
|
81
|
-
y: value,
|
|
17
|
+
_defineProperty(this, "onSelect", event => {
|
|
18
|
+
if (!this.viewRef.current) return;
|
|
19
|
+
if (!this.state.props.dataset) return;
|
|
20
|
+
const {
|
|
21
|
+
dataIndex,
|
|
22
|
+
y,
|
|
23
|
+
seriesIndex
|
|
24
|
+
} = event;
|
|
25
|
+
const selectedItem = this.props.dataset[dataIndex];
|
|
26
|
+
const selectedChartItem = [{
|
|
27
|
+
series: seriesIndex,
|
|
28
|
+
x: dataIndex,
|
|
29
|
+
y,
|
|
82
30
|
_dataObj: selectedItem
|
|
83
|
-
},
|
|
31
|
+
}, dataIndex];
|
|
84
32
|
this.updateState({
|
|
85
|
-
tooltipXaxis: label,
|
|
86
|
-
tooltipYaxis: value,
|
|
87
|
-
isTooltipOpen: true,
|
|
88
33
|
selectedItem: {
|
|
89
34
|
...selectedItem,
|
|
90
|
-
index:
|
|
91
|
-
}
|
|
92
|
-
tooltipXPosition: tooltipX - this.state.tooltipoffsetx,
|
|
93
|
-
tooltipYPosition: tooltipY - this.state.tooltipoffsety
|
|
35
|
+
index: dataIndex
|
|
36
|
+
}
|
|
94
37
|
});
|
|
95
|
-
this.invokeEventCallback('onSelect', [
|
|
38
|
+
this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);
|
|
96
39
|
});
|
|
97
40
|
}
|
|
41
|
+
labelFn(data) {
|
|
42
|
+
return this.abbreviateNumber(data.datum.y);
|
|
43
|
+
}
|
|
98
44
|
renderWidget(props) {
|
|
45
|
+
var _this$state$data, _this$state$colors, _props$tooltip;
|
|
99
46
|
this.invokeEventCallback('onBeforerender', [this.proxy, null]);
|
|
100
|
-
if (!this.state.data.length) {
|
|
47
|
+
if (!((_this$state$data = this.state.data) !== null && _this$state$data !== void 0 && _this$state$data.length)) {
|
|
101
48
|
return null;
|
|
102
49
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
};
|
|
50
|
+
const chartData = this.state.data.map((series, i) => ({
|
|
51
|
+
name: this.state.yAxis[i],
|
|
52
|
+
data: series.map(pt => pt.y)
|
|
53
|
+
}));
|
|
54
|
+
const showLegend = props.showlegend !== 'hide';
|
|
55
|
+
const legendPosition = ['top', 'bottom', 'left', 'right'].includes(props.showlegend) ? props.showlegend : 'bottom';
|
|
56
|
+
const minDomain = this.getMinDomain();
|
|
57
|
+
|
|
58
|
+
// ColumnChart swaps category/value axes when horizontal=true. WaveMaker x-axis props
|
|
59
|
+
// refer to categories (xaxisdatakey) and y-axis props refer to values (yaxisdatakey).
|
|
60
|
+
const isHorizontal = !!props.horizontal;
|
|
61
|
+
const series = ((_this$state$colors = this.state.colors) !== null && _this$state$colors !== void 0 && _this$state$colors.length ? this.state.colors : ['#000']).map(color => ({
|
|
62
|
+
color
|
|
63
|
+
}));
|
|
64
|
+
const xAxisTickLabelFormatter = isHorizontal ? this.getYAxisTickLabelFormatter() : this.getXAxisTickLabelFormatter();
|
|
65
|
+
const yAxisTickLabelFormatter = isHorizontal ? this.getXAxisTickLabelFormatter() : this.getYAxisTickLabelFormatter();
|
|
107
66
|
return /*#__PURE__*/React.createElement(View, _extends({}, getAccessibilityProps(AccessibilityWidgetType.LINECHART, props), {
|
|
108
67
|
style: this.styles.root,
|
|
109
68
|
onLayout: this.onViewLayoutChange.bind(this)
|
|
@@ -120,25 +79,48 @@ export default class WmBarChart extends BaseChartComponent {
|
|
|
120
79
|
style: this.styles.title
|
|
121
80
|
}, props.title) : null) : null, props.subheading ? /*#__PURE__*/React.createElement(Text, {
|
|
122
81
|
style: this.styles.subHeading
|
|
123
|
-
}, props.subheading) : null), /*#__PURE__*/React.createElement(View, {
|
|
82
|
+
}, props.subheading) : null), this.state.chartWidth ? /*#__PURE__*/React.createElement(View, {
|
|
124
83
|
ref: this.viewRef
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
height: this.styles.root.height,
|
|
84
|
+
}, /*#__PURE__*/React.createElement(ColumnChart, {
|
|
85
|
+
data: chartData,
|
|
128
86
|
width: this.state.chartWidth || this.screenWidth,
|
|
129
|
-
|
|
130
|
-
|
|
87
|
+
height: this.styles.root.height,
|
|
88
|
+
colors: this.state.colors,
|
|
89
|
+
theme: this.getChartTheme(isHorizontal, series),
|
|
90
|
+
horizontal: props.horizontal,
|
|
91
|
+
stack: props.viewtype === 'Stacked' ? 'total' : false,
|
|
92
|
+
stackNormalize: props.stacknormalize,
|
|
93
|
+
cornerRadius: [this.styles.bar.borderTopLeftRadius, this.styles.bar.borderTopRightRadius, this.styles.bar.borderBottomRightRadius, this.styles.bar.borderBottomLeftRadius],
|
|
94
|
+
barOutsideLabelFormatter: props.showvalues ? value => String(this.abbreviateNumber(value)) : undefined,
|
|
95
|
+
minY: minDomain.y,
|
|
96
|
+
maxY: this.state.chartMaxY,
|
|
97
|
+
minX: minDomain.x,
|
|
98
|
+
maxX: this.state.chartMaxX,
|
|
99
|
+
grid: {
|
|
131
100
|
top: props.offsettop,
|
|
132
101
|
bottom: props.offsetbottom,
|
|
133
102
|
left: this.isRTL ? props.offsetright : props.offsetleft,
|
|
134
103
|
right: this.isRTL ? props.offsetleft : props.offsetright
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
104
|
+
},
|
|
105
|
+
showXAxis: isHorizontal ? props.showyaxis : props.showxaxis,
|
|
106
|
+
showXAxisTicks: isHorizontal ? props.showyaxisticks : props.showxaxisticks,
|
|
107
|
+
showYAxis: isHorizontal ? props.showxaxis : props.showyaxis,
|
|
108
|
+
showYAxisTicks: isHorizontal ? props.showxaxisticks : props.showyaxisticks,
|
|
109
|
+
showXAxisSplitLines: isHorizontal ? !props.hidegridyaxis : !props.hidegridxaxis,
|
|
110
|
+
showYAxisSplitLines: isHorizontal ? !props.hidegridxaxis : !props.hidegridyaxis,
|
|
111
|
+
xAxisLabel: isHorizontal ? this.state.yLabel || '' : this.state.xLabel || '',
|
|
112
|
+
yAxisLabel: isHorizontal ? this.state.xLabel || '' : this.state.yLabel || '',
|
|
113
|
+
xAxisTickLabelFormatter: xAxisTickLabelFormatter,
|
|
114
|
+
yAxisTickLabelFormatter: yAxisTickLabelFormatter,
|
|
115
|
+
showLegend: showLegend,
|
|
116
|
+
legendPosition: legendPosition,
|
|
117
|
+
tooltip: props.tooltips ? this.hasCustomTooltip ? 'none' : (_props$tooltip = props.tooltip) !== null && _props$tooltip !== void 0 ? _props$tooltip : 'card' : 'none',
|
|
118
|
+
renderTooltip: this.getRenderTooltip(),
|
|
119
|
+
showHighlighter: props.showhighlighter,
|
|
120
|
+
onSelect: this.onSelect,
|
|
121
|
+
intervalX: isHorizontal ? props.intervaly : props.intervalx,
|
|
122
|
+
intervalY: isHorizontal ? props.intervalx : props.intervaly
|
|
123
|
+
})) : null);
|
|
142
124
|
}
|
|
143
125
|
}
|
|
144
126
|
//# sourceMappingURL=bar-chart.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","Platform","AccessibilityWidgetType","getAccessibilityProps","VictoryChart","VictoryBar","VictoryStack","VictoryGroup","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","WmIcon","WmBarChartState","WmBarChart","constructor","props","labelFn","data","abbreviateNumber","datum","y","getBarChart","isNested","Array","isArray","state","length","map","d","i","createElement","_extends","key","name","horizontal","labels","showvalues","bind","undefined","isRTL","toReversed","height","alignment","style","customcolors","fill","colors","_this$state$colors$da","x","stroke","_this$state$colors$da2","strokeWidth","showzerothvalue","cornerRadius","topLeft","styles","bar","borderTopLeftRadius","topRight","borderTopRightRadius","bottomLeft","borderBottomLeftRadius","bottomRight","borderBottomRightRadius","events","target","eventHandlers","OS","onClick","onSelect","onPress","barwidth","barWidth","event","viewRef","current","dataset","measureInWindow","chartX","chartY","value","index","label","xaxisDatakeyArr","selectedItem","nativeEvent","tooltipX","pageX","tooltipY","pageY","selectedChartItem","series","_dataObj","updateState","tooltipXaxis","tooltipYaxis","isTooltipOpen","tooltipXPosition","tooltipoffsetx","tooltipYPosition","tooltipoffsety","invokeEventCallback","proxy","renderWidget","mindomain","xdomain","chartMinX","ydomain","chartMinY","LINECHART","root","onLayout","onViewLayoutChange","title","iconclass","testID","flexDirection","alignItems","icon","subheading","subHeading","ref","getTooltip","theme","width","chartWidth","screenWidth","minDomain","padding","top","offsettop","bottom","offsetbottom","left","offsetright","offsetleft","right","getLegendView","getXaxis","getYAxis","viewtype","colorScale","offset"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, Platform, LayoutChangeEvent } from 'react-native';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport {\n VictoryChart,\n VictoryBar,\n VictoryLegend,\n VictoryStack,\n VictoryGroup\n} from \"victory-native\";\n\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmBarChartProps from './bar-chart.props';\nimport { DEFAULT_CLASS, WmBarChartStyles } from './bar-chart.styles';\nimport WmIcon from \"@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component\";\nimport { min } from 'moment';\nimport { isWebPreviewMode } from '@wavemaker-ai/app-rn-runtime/core/utils';\n\nexport class WmBarChartState extends BaseChartComponentState<WmBarChartProps> {}\n\nexport default class WmBarChart extends BaseChartComponent<WmBarChartProps, WmBarChartState, WmBarChartStyles> {\n\n constructor(props: WmBarChartProps) {\n super(props, DEFAULT_CLASS, new WmBarChartProps(), new WmBarChartState());\n }\n\n labelFn(data: any): string | number | string[] | number[] | null {\n return this.abbreviateNumber(data.datum.y);\n }\n\n getBarChart(props: WmBarChartProps) {\n const isNested = Array.isArray(this.state.data[0]) && this.state.data.length > 1;\n return this.state.data.map((d: any, i: number) => {\n return <VictoryBar key={props.name + '_' + i}\n horizontal={props.horizontal} labels={props.showvalues ? this.labelFn.bind(this) : undefined}\n data={this.isRTL?d.toReversed():d}\n height={100}\n alignment={this.isRTL ? 'end' : 'start'}\n style={props.customcolors?{\n data: {\n fill:isNested ? this.state.colors[i % this.state.colors.length] : ({ datum }) => this.state.colors[datum.x] ?? this.state.colors[datum.x % this.state.colors.length],\n stroke: isNested ? this.state.colors[i % this.state.colors.length] : ({ datum }) => this.state.colors[datum.x] ?? this.state.colors[datum.x % this.state.colors.length],\n strokeWidth: props.showzerothvalue ? 3 : 0\n }\n }:{\n data: {\n strokeWidth: props.showzerothvalue ? 3 : 0\n }\n }}\n cornerRadius={{topLeft: this.styles.bar.borderTopLeftRadius, topRight: this.styles.bar.borderTopRightRadius, bottomLeft: this.styles.bar.borderBottomLeftRadius, bottomRight: this.styles.bar.borderBottomRightRadius}}\n events={[{\n target: 'data',\n eventHandlers: Platform.OS == \"web\" ? {\n onClick: this.onSelect.bind(this)\n }:{\n onPress: this.onSelect.bind(this)\n }\n }]}\n {...(props.barwidth ? { barWidth: props.barwidth } : {})} />\n });\n }\n\nonSelect(event: any, data: any){\n if (!this.viewRef.current) return;\n if (!this.state.props.dataset) return;\n this.viewRef.current.measureInWindow((chartX: number, chartY: number) => {\n let value = data.data[data.index].y;\n let label = this.state.xaxisDatakeyArr[data.datum.x];\n let selectedItem = this.props.dataset[data.index];\n const nativeEvent = event.nativeEvent;\n let tooltipX = nativeEvent.pageX - chartX;\n let tooltipY = nativeEvent.pageY - chartY;\n let selectedChartItem = [{series: 0, x: data.index, y: value,_dataObj: selectedItem},data.index];\n this.updateState({\n tooltipXaxis: label,\n tooltipYaxis: value,\n isTooltipOpen: true,\n selectedItem: {...selectedItem, index: data.index},\n tooltipXPosition: tooltipX - this.state.tooltipoffsetx,\n tooltipYPosition: tooltipY - this.state.tooltipoffsety\n } as WmBarChartState)\n this.invokeEventCallback('onSelect', [event.nativeEvent, this.proxy, selectedItem, selectedChartItem ]);\n });\n}\n\n renderWidget(props: WmBarChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data.length) {\n return null;\n }\n let mindomain={x: this.props.xdomain === 'Min' ? this.state.chartMinX: undefined, y: this.props.ydomain === 'Min' ? this.state.chartMinY: undefined};\n return (<View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n <View>\n { (props.title || props.iconclass) ? (\n <View testID=\"title-icon-container\" style={{flexDirection: 'row', alignItems: 'center'}}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon}></WmIcon>) : null }\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null }\n </View>\n ) : null }\n { props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text> ) : null }\n </View>\n <View ref={this.viewRef}>\n {this.getTooltip()}\n <VictoryChart theme={this.state.theme}\n height={(this.styles.root.height) as number}\n width={this.state.chartWidth || this.screenWidth}\n minDomain={mindomain}\n padding={{ top: props.offsettop, bottom: props.offsetbottom, left: this.isRTL ? props.offsetright : props.offsetleft, right: this.isRTL ? props.offsetleft : props.offsetright }}>\n {this.getLegendView()}\n {this.getXaxis()}\n {this.getYAxis()}\n {\n props.viewtype === 'Stacked' ? <VictoryStack\n colorScale={!this.theme ? this.state.colors : undefined}>\n {\n this.getBarChart(props)\n }\n </VictoryStack> : <VictoryGroup colorScale={!this.theme ? this.state.colors : undefined} offset={10} >\n {\n this.getBarChart(props)\n }\n </VictoryGroup>\n }\n </VictoryChart></View></View>);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAA2B,cAAc;AACtE,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAChH,SACEC,YAAY,EACZC,UAAU,EAEVC,YAAY,EACZC,YAAY,QACP,gBAAgB;A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ccessibilityWidgetType","getAccessibilityProps","BaseChartComponent","BaseChartComponentState","WmBarChartProps","DEFAULT_CLASS","WmIcon","WmBarChartState","WmBarChart","constructor","props","_defineProperty","event","viewRef","current","state","dataset","dataIndex","y","seriesIndex","selectedItem","selectedChartItem","series","x","_dataObj","updateState","index","invokeEventCallback","proxy","labelFn","data","abbreviateNumber","datum","renderWidget","_this$state$data","_this$state$colors","_props$tooltip","length","chartData","map","i","name","yAxis","pt","showLegend","showlegend","legendPosition","includes","minDomain","getMinDomain","isHorizontal","horizontal","colors","color","xAxisTickLabelFormatter","getYAxisTickLabelFormatter","getXAxisTickLabelFormatter","yAxisTickLabelFormatter","createElement","_extends","LINECHART","style","styles","root","onLayout","onViewLayoutChange","bind","title","iconclass","testID","flexDirection","alignItems","icon","subheading","subHeading","chartWidth","ref","width","screenWidth","height","theme","getChartTheme","stack","viewtype","stackNormalize","stacknormalize","cornerRadius","bar","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","barOutsideLabelFormatter","showvalues","value","String","undefined","minY","maxY","chartMaxY","minX","maxX","chartMaxX","grid","top","offsettop","bottom","offsetbottom","left","isRTL","offsetright","offsetleft","right","showXAxis","showyaxis","showxaxis","showXAxisTicks","showyaxisticks","showxaxisticks","showYAxis","showYAxisTicks","showXAxisSplitLines","hidegridyaxis","hidegridxaxis","showYAxisSplitLines","xAxisLabel","yLabel","xLabel","yAxisLabel","tooltip","tooltips","hasCustomTooltip","renderTooltip","getRenderTooltip","showHighlighter","showhighlighter","onSelect","intervalX","intervaly","intervalx","intervalY"],"sources":["bar-chart.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text } from 'react-native';\nimport { ColumnChart, CartesianChartSelectEvent, AreaChartAxisTooltipParams } from '@wavemaker/react-native-echarts';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker-ai/app-rn-runtime/core/accessibility';\nimport {\n BaseChartComponent,\n BaseChartComponentState\n} from \"@wavemaker-ai/app-rn-runtime/components/chart/basechart.component\";\nimport WmBarChartProps from './bar-chart.props';\nimport { DEFAULT_CLASS, WmBarChartStyles } from './bar-chart.styles';\nimport WmIcon from \"@wavemaker-ai/app-rn-runtime/components/basic/icon/icon.component\";\nimport isEmpty from 'lodash-es/isEmpty';\n\nexport class WmBarChartState extends BaseChartComponentState<WmBarChartProps> {}\n\nexport default class WmBarChart extends BaseChartComponent<WmBarChartProps, WmBarChartState, WmBarChartStyles> {\n\n constructor(props: WmBarChartProps) {\n super(props, DEFAULT_CLASS, new WmBarChartProps(), new WmBarChartState());\n }\n\n labelFn(data: any): string | number | string[] | number[] | null {\n return this.abbreviateNumber(data.datum.y);\n }\n\n\n onSelect = (event: CartesianChartSelectEvent): void => {\n if (!this.viewRef.current) return;\n if (!this.state.props.dataset) return;\n const { dataIndex, y, seriesIndex } = event;\n const selectedItem = this.props.dataset[dataIndex];\n const selectedChartItem = [\n { series: seriesIndex, x: dataIndex, y, _dataObj: selectedItem },\n dataIndex,\n ];\n this.updateState({\n selectedItem: { ...selectedItem, index: dataIndex },\n } as WmBarChartState);\n this.invokeEventCallback('onSelect', [null, this.proxy, selectedItem, selectedChartItem]);\n}\n\n renderWidget(props: WmBarChartProps) {\n this.invokeEventCallback('onBeforerender', [this.proxy, null]);\n if (!this.state.data?.length) {\n return null;\n }\n\n const chartData = this.state.data.map((series: any[], i: number) => ({\n name: this.state.yAxis[i],\n data: series.map((pt: { x: number; y: number }) => pt.y),\n }));\n\n const showLegend = props.showlegend !== 'hide';\n const legendPosition = (['top', 'bottom', 'left', 'right'].includes(props.showlegend)\n ? props.showlegend : 'bottom') as 'top' | 'bottom' | 'left' | 'right';\n const minDomain = this.getMinDomain();\n\n // ColumnChart swaps category/value axes when horizontal=true. WaveMaker x-axis props\n // refer to categories (xaxisdatakey) and y-axis props refer to values (yaxisdatakey).\n const isHorizontal = !!props.horizontal;\n const series = (this.state.colors?.length ? this.state.colors : ['#000']).map((color: string) => ({\n color,\n }));\n const xAxisTickLabelFormatter = isHorizontal\n ? this.getYAxisTickLabelFormatter()\n : this.getXAxisTickLabelFormatter();\n const yAxisTickLabelFormatter = isHorizontal\n ? this.getXAxisTickLabelFormatter()\n : this.getYAxisTickLabelFormatter();\n\n return (\n <View\n {...getAccessibilityProps(AccessibilityWidgetType.LINECHART, props)}\n style={this.styles.root}\n onLayout={this.onViewLayoutChange.bind(this)}\n >\n <View>\n {(props.title || props.iconclass) ? (\n <View testID=\"title-icon-container\" style={{ flexDirection: 'row', alignItems: 'center' }}>\n {props.iconclass ? (<WmIcon iconclass={props.iconclass} styles={this.styles.icon} />) : null}\n {props.title ? (<Text style={this.styles.title}>{props.title}</Text>) : null}\n </View>\n ) : null}\n {props.subheading ? (\n <Text style={this.styles.subHeading}>{props.subheading}</Text>\n ) : null}\n </View>\n {this.state.chartWidth ? (\n <View ref={this.viewRef}>\n <ColumnChart\n data={chartData}\n width={this.state.chartWidth || this.screenWidth}\n height={this.styles.root.height as number}\n colors={this.state.colors}\n theme={this.getChartTheme(isHorizontal, series)}\n horizontal={props.horizontal}\n stack={props.viewtype === 'Stacked' ? 'total' : false}\n stackNormalize={props.stacknormalize}\n cornerRadius={[\n this.styles.bar.borderTopLeftRadius,\n this.styles.bar.borderTopRightRadius,\n this.styles.bar.borderBottomRightRadius,\n this.styles.bar.borderBottomLeftRadius,\n ]}\n barOutsideLabelFormatter={props.showvalues\n ? (value: number) => String(this.abbreviateNumber(value))\n : undefined}\n minY={minDomain.y}\n maxY={this.state.chartMaxY}\n minX={minDomain.x}\n maxX={this.state.chartMaxX}\n grid={{\n top: props.offsettop,\n bottom: props.offsetbottom,\n left: this.isRTL ? props.offsetright : props.offsetleft,\n right: this.isRTL ? props.offsetleft : props.offsetright,\n }}\n showXAxis={isHorizontal ? props.showyaxis : props.showxaxis}\n showXAxisTicks={isHorizontal ? props.showyaxisticks : props.showxaxisticks}\n showYAxis={isHorizontal ? props.showxaxis : props.showyaxis}\n showYAxisTicks={isHorizontal ? props.showxaxisticks : props.showyaxisticks}\n showXAxisSplitLines={isHorizontal ? !props.hidegridyaxis : !props.hidegridxaxis}\n showYAxisSplitLines={isHorizontal ? !props.hidegridxaxis : !props.hidegridyaxis}\n xAxisLabel={isHorizontal ? (this.state.yLabel || '') : (this.state.xLabel || '')}\n yAxisLabel={isHorizontal ? (this.state.xLabel || '') : (this.state.yLabel || '')}\n xAxisTickLabelFormatter={xAxisTickLabelFormatter}\n yAxisTickLabelFormatter={yAxisTickLabelFormatter}\n showLegend={showLegend}\n legendPosition={legendPosition}\n tooltip={props.tooltips ? (this.hasCustomTooltip ? 'none' : (props.tooltip ?? 'card')) : 'none'}\n renderTooltip={this.getRenderTooltip()}\n showHighlighter={props.showhighlighter}\n onSelect={this.onSelect}\n intervalX={isHorizontal ? props.intervaly : props.intervalx}\n intervalY={isHorizontal ? props.intervalx : props.intervaly}\n />\n </View>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,WAAW,QAA+D,iCAAiC;AACpH,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,iDAAiD;AAChH,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,mEAAmE;AAC1E,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,aAAa,QAA0B,oBAAoB;AACpE,OAAOC,MAAM,MAAM,mEAAmE;AAGtF,OAAO,MAAMC,eAAe,SAASJ,uBAAuB,CAAkB;AAE9E,eAAe,MAAMK,UAAU,SAASN,kBAAkB,CAAqD;EAE7GO,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEL,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIG,eAAe,CAAC,CAAC,CAAC;IAACI,eAAA,mBAQhEC,KAAgC,IAAW;MACvD,IAAI,CAAC,IAAI,CAACC,OAAO,CAACC,OAAO,EAAE;MAC3B,IAA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