gifted-charts-core 0.1.17 → 0.1.19
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/package.json +1 -1
- package/src/BarChart/Animated2DWithGradient.js +17 -17
- package/src/BarChart/Animated2DWithGradient.ts +2 -2
- package/src/BarChart/index.js +1 -0
- package/src/BarChart/index.ts +1 -0
- package/src/BarChart/types.d.ts +9 -0
- package/src/BarChart/types.ts +9 -0
- package/src/LineChart/LineChartBiColor.js +1 -0
- package/src/LineChart/LineChartBiColor.ts +1 -0
- package/src/LineChart/index.js +1 -0
- package/src/LineChart/index.ts +1 -0
- package/src/components/BarAndLineChartsWrapper/index.d.ts +3 -37
- package/src/components/BarAndLineChartsWrapper/index.js +4 -3
- package/src/components/BarAndLineChartsWrapper/index.ts +8 -5
- package/src/index.d.ts +1 -1
- package/src/index.ts +3 -1
- package/src/utils/constants.d.ts +2 -1
- package/src/utils/constants.js +32 -28
- package/src/utils/constants.ts +33 -29
- package/src/utils/index.js +6 -2
- package/src/utils/index.ts +9 -1
- package/src/utils/types.d.ts +37 -1
- package/src/utils/types.ts +40 -1
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
25
25
|
};
|
|
26
26
|
import { getBarFrontColor, getBarWidth } from '../utils';
|
|
27
27
|
export var getPropsForAnimated2DWithGradient = function (props) {
|
|
28
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
28
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
29
29
|
var barBorderWidth = props.barBorderWidth, barBorderColor = props.barBorderColor, barBorderRadius = props.barBorderRadius, item = props.item, barBorderTopLeftRadius = props.barBorderTopLeftRadius, barBorderTopRightRadius = props.barBorderTopRightRadius, barBorderBottomLeftRadius = props.barBorderBottomLeftRadius, barBorderBottomRightRadius = props.barBorderBottomRightRadius, barWidth = props.barWidth, barInnerComponent = props.barInnerComponent, barStyle = props.barStyle, index = props.index, opacity = props.opacity, barHeight = props.barHeight, intactTopLabel = props.intactTopLabel, showValuesAsTopLabel = props.showValuesAsTopLabel, topLabelContainerStyle = props.topLabelContainerStyle, topLabelTextStyle = props.topLabelTextStyle, roundedBottom = props.roundedBottom, cappedBars = props.cappedBars, capRadius = props.capRadius, roundedTop = props.roundedTop, barBackgroundPattern = props.barBackgroundPattern, patternId = props.patternId, frontColor = props.frontColor, showGradient = props.showGradient, gradientColor = props.gradientColor, selectedIndex = props.selectedIndex, focusBarOnPress = props.focusBarOnPress, focusedBarConfig = props.focusedBarConfig, isThreeD = props.isThreeD, yAxisOffset = props.yAxisOffset;
|
|
30
30
|
var isFocused = (focusBarOnPress !== null && focusBarOnPress !== void 0 ? focusBarOnPress : false) && selectedIndex === index;
|
|
31
31
|
var itemOrPropsBarBorderRadius = (_b = (_a = item.barBorderRadius) !== null && _a !== void 0 ? _a : barBorderRadius) !== null && _b !== void 0 ? _b : 0;
|
|
@@ -41,16 +41,16 @@ export var getPropsForAnimated2DWithGradient = function (props) {
|
|
|
41
41
|
position: 'absolute',
|
|
42
42
|
width: '100%',
|
|
43
43
|
height: '100%',
|
|
44
|
-
borderWidth: barBorderWidth !== null &&
|
|
45
|
-
borderColor: barBorderColor,
|
|
44
|
+
borderWidth: (_f = (_e = item.barBorderWidth) !== null && _e !== void 0 ? _e : barBorderWidth) !== null && _f !== void 0 ? _f : 0,
|
|
45
|
+
borderColor: (_g = item.barBorderColor) !== null && _g !== void 0 ? _g : barBorderColor,
|
|
46
46
|
borderRadius: localBarBorderRadius,
|
|
47
|
-
borderTopLeftRadius: (
|
|
48
|
-
borderTopRightRadius: (
|
|
49
|
-
borderBottomLeftRadius: (
|
|
50
|
-
borderBottomRightRadius: (
|
|
47
|
+
borderTopLeftRadius: (_j = (_h = item.barBorderTopLeftRadius) !== null && _h !== void 0 ? _h : barBorderTopLeftRadius) !== null && _j !== void 0 ? _j : localBarBorderRadius,
|
|
48
|
+
borderTopRightRadius: (_l = (_k = item.barBorderTopRightRadius) !== null && _k !== void 0 ? _k : barBorderTopRightRadius) !== null && _l !== void 0 ? _l : localBarBorderRadius,
|
|
49
|
+
borderBottomLeftRadius: (_o = (_m = item.barBorderBottomLeftRadius) !== null && _m !== void 0 ? _m : barBorderBottomLeftRadius) !== null && _o !== void 0 ? _o : localBarBorderRadius,
|
|
50
|
+
borderBottomRightRadius: (_q = (_p = item.barBorderBottomRightRadius) !== null && _p !== void 0 ? _p : barBorderBottomRightRadius) !== null && _q !== void 0 ? _q : localBarBorderRadius
|
|
51
51
|
}
|
|
52
52
|
];
|
|
53
|
-
if ((
|
|
53
|
+
if ((_r = roundedBottom !== null && roundedBottom !== void 0 ? roundedBottom : (isFocused && (focusedBarConfig === null || focusedBarConfig === void 0 ? void 0 : focusedBarConfig.roundedBottom))) !== null && _r !== void 0 ? _r : false) {
|
|
54
54
|
commonStyleForBar.push({
|
|
55
55
|
borderBottomLeftRadius: localBarWidth / 2,
|
|
56
56
|
borderBottomRightRadius: localBarWidth / 2
|
|
@@ -58,11 +58,11 @@ export var getPropsForAnimated2DWithGradient = function (props) {
|
|
|
58
58
|
}
|
|
59
59
|
if (cappedBars !== null && cappedBars !== void 0 ? cappedBars : false) {
|
|
60
60
|
commonStyleForBar.push({
|
|
61
|
-
borderTopLeftRadius: item.capRadius === 0 ? 0 : (
|
|
62
|
-
borderTopRightRadius: item.capRadius === 0 ? 0 : (
|
|
61
|
+
borderTopLeftRadius: item.capRadius === 0 ? 0 : (_t = (_s = item.capRadius) !== null && _s !== void 0 ? _s : capRadius) !== null && _t !== void 0 ? _t : 0,
|
|
62
|
+
borderTopRightRadius: item.capRadius === 0 ? 0 : (_v = (_u = item.capRadius) !== null && _u !== void 0 ? _u : capRadius) !== null && _v !== void 0 ? _v : 0
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
if ((
|
|
65
|
+
if ((_w = roundedTop !== null && roundedTop !== void 0 ? roundedTop : (isFocused && (focusedBarConfig === null || focusedBarConfig === void 0 ? void 0 : focusedBarConfig.roundedTop))) !== null && _w !== void 0 ? _w : false) {
|
|
66
66
|
commonStyleForBar.push({
|
|
67
67
|
borderTopLeftRadius: localBarWidth / 2,
|
|
68
68
|
borderTopRightRadius: localBarWidth / 2
|
|
@@ -74,22 +74,22 @@ export var getPropsForAnimated2DWithGradient = function (props) {
|
|
|
74
74
|
}
|
|
75
75
|
], false);
|
|
76
76
|
var commonPropsFor2Dand3Dbars = {
|
|
77
|
-
barBackgroundPattern: (
|
|
77
|
+
barBackgroundPattern: (_x = item.barBackgroundPattern) !== null && _x !== void 0 ? _x : barBackgroundPattern,
|
|
78
78
|
barInnerComponent: isFocused
|
|
79
|
-
? (
|
|
79
|
+
? (_y = focusedBarConfig === null || focusedBarConfig === void 0 ? void 0 : focusedBarConfig.barInnerComponent) !== null && _y !== void 0 ? _y : barInnerComponent
|
|
80
80
|
: barInnerComponent,
|
|
81
|
-
patternId: (
|
|
81
|
+
patternId: (_z = item.patternId) !== null && _z !== void 0 ? _z : patternId,
|
|
82
82
|
barWidth: localBarWidth,
|
|
83
83
|
barStyle: barStyle,
|
|
84
84
|
item: item,
|
|
85
85
|
index: index,
|
|
86
86
|
frontColor: localFrontColor,
|
|
87
|
-
showGradient: (
|
|
87
|
+
showGradient: (_1 = (_0 = item.showGradient) !== null && _0 !== void 0 ? _0 : showGradient) !== null && _1 !== void 0 ? _1 : false,
|
|
88
88
|
gradientColor: isFocused
|
|
89
|
-
? (
|
|
89
|
+
? (_2 = focusedBarConfig === null || focusedBarConfig === void 0 ? void 0 : focusedBarConfig.gradientColor) !== null && _2 !== void 0 ? _2 : localGradientColor
|
|
90
90
|
: localGradientColor,
|
|
91
91
|
opacity: isFocused
|
|
92
|
-
? (
|
|
92
|
+
? (_3 = focusedBarConfig === null || focusedBarConfig === void 0 ? void 0 : focusedBarConfig.opacity) !== null && _3 !== void 0 ? _3 : localOpacity
|
|
93
93
|
: localOpacity,
|
|
94
94
|
height: barHeight,
|
|
95
95
|
intactTopLabel: intactTopLabel,
|
|
@@ -99,8 +99,8 @@ export const getPropsForAnimated2DWithGradient = (
|
|
|
99
99
|
position: 'absolute',
|
|
100
100
|
width: '100%',
|
|
101
101
|
height: '100%',
|
|
102
|
-
borderWidth: barBorderWidth ?? 0,
|
|
103
|
-
borderColor: barBorderColor,
|
|
102
|
+
borderWidth: item.barBorderWidth ?? barBorderWidth ?? 0,
|
|
103
|
+
borderColor: item.barBorderColor ?? barBorderColor,
|
|
104
104
|
borderRadius: localBarBorderRadius,
|
|
105
105
|
borderTopLeftRadius:
|
|
106
106
|
item.barBorderTopLeftRadius ??
|
package/src/BarChart/index.js
CHANGED
|
@@ -490,6 +490,7 @@ export var useBarChart = function (props) {
|
|
|
490
490
|
scrollAnimation: scrollAnimation,
|
|
491
491
|
scrollEventThrottle: scrollEventThrottle,
|
|
492
492
|
indicatorColor: props.indicatorColor,
|
|
493
|
+
selectedIndex: selectedIndex,
|
|
493
494
|
setSelectedIndex: setSelectedIndex,
|
|
494
495
|
spacing: spacing,
|
|
495
496
|
showLine: showLine,
|
package/src/BarChart/index.ts
CHANGED
package/src/BarChart/types.d.ts
CHANGED
|
@@ -335,6 +335,10 @@ export interface lineConfigType {
|
|
|
335
335
|
arrowConfig?: arrowType;
|
|
336
336
|
customDataPoint?: Function;
|
|
337
337
|
isSecondary?: boolean;
|
|
338
|
+
focusEnabled?: boolean;
|
|
339
|
+
focusedDataPointColor?: ColorValue;
|
|
340
|
+
focusedDataPointRadius?: number;
|
|
341
|
+
focusedDataPointIndex?: number;
|
|
338
342
|
}
|
|
339
343
|
export interface defaultLineConfigType {
|
|
340
344
|
initialSpacing: number;
|
|
@@ -364,6 +368,9 @@ export interface defaultLineConfigType {
|
|
|
364
368
|
arrowConfig: arrowType;
|
|
365
369
|
customDataPoint?: Function;
|
|
366
370
|
isSecondary: boolean;
|
|
371
|
+
focusEnabled: boolean;
|
|
372
|
+
focusedDataPointColor: ColorValue;
|
|
373
|
+
focusedDataPointRadius: number;
|
|
367
374
|
}
|
|
368
375
|
interface arrowType {
|
|
369
376
|
length?: number;
|
|
@@ -390,6 +397,8 @@ export interface barDataItem {
|
|
|
390
397
|
labelsDistanceFromXaxis?: number;
|
|
391
398
|
barWidth?: number;
|
|
392
399
|
sideWidth?: number;
|
|
400
|
+
barBorderWidth?: number;
|
|
401
|
+
barBorderColor?: ColorValue;
|
|
393
402
|
labelTextStyle?: any;
|
|
394
403
|
topLabelComponent?: Function;
|
|
395
404
|
topLabelContainerStyle?: any;
|
package/src/BarChart/types.ts
CHANGED
|
@@ -374,6 +374,10 @@ export interface lineConfigType {
|
|
|
374
374
|
arrowConfig?: arrowType
|
|
375
375
|
customDataPoint?: Function
|
|
376
376
|
isSecondary?: boolean
|
|
377
|
+
focusEnabled?: boolean
|
|
378
|
+
focusedDataPointColor?: ColorValue
|
|
379
|
+
focusedDataPointRadius?: number
|
|
380
|
+
focusedDataPointIndex?: number
|
|
377
381
|
}
|
|
378
382
|
export interface defaultLineConfigType {
|
|
379
383
|
initialSpacing: number
|
|
@@ -403,6 +407,9 @@ export interface defaultLineConfigType {
|
|
|
403
407
|
arrowConfig: arrowType
|
|
404
408
|
customDataPoint?: Function
|
|
405
409
|
isSecondary: boolean
|
|
410
|
+
focusEnabled: boolean
|
|
411
|
+
focusedDataPointColor: ColorValue
|
|
412
|
+
focusedDataPointRadius: number
|
|
406
413
|
}
|
|
407
414
|
interface arrowType {
|
|
408
415
|
length?: number
|
|
@@ -431,6 +438,8 @@ export interface barDataItem {
|
|
|
431
438
|
labelsDistanceFromXaxis?: number
|
|
432
439
|
barWidth?: number
|
|
433
440
|
sideWidth?: number
|
|
441
|
+
barBorderWidth?: number
|
|
442
|
+
barBorderColor?: ColorValue
|
|
434
443
|
labelTextStyle?: any
|
|
435
444
|
topLabelComponent?: Function
|
|
436
445
|
topLabelContainerStyle?: any
|
|
@@ -398,6 +398,7 @@ export var useLineChartBiColor = function (props) {
|
|
|
398
398
|
scrollAnimation: scrollAnimation,
|
|
399
399
|
scrollEventThrottle: scrollEventThrottle,
|
|
400
400
|
indicatorColor: props.indicatorColor,
|
|
401
|
+
selectedIndex: selectedIndex,
|
|
401
402
|
setSelectedIndex: setSelectedIndex,
|
|
402
403
|
spacing: spacing,
|
|
403
404
|
showLine: false,
|
package/src/LineChart/index.js
CHANGED
|
@@ -1081,6 +1081,7 @@ export var useLineChart = function (props) {
|
|
|
1081
1081
|
scrollAnimation: scrollAnimation,
|
|
1082
1082
|
scrollEventThrottle: scrollEventThrottle,
|
|
1083
1083
|
indicatorColor: props.indicatorColor,
|
|
1084
|
+
selectedIndex: selectedIndex,
|
|
1084
1085
|
setSelectedIndex: setSelectedIndex,
|
|
1085
1086
|
spacing: spacing,
|
|
1086
1087
|
showLine: false,
|
package/src/LineChart/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type BarAndLineChartsWrapperTypes, type horizSectionPropTypes } from '../../utils/types';
|
|
2
|
+
import { LineInBarChartPropsType, type BarAndLineChartsWrapperTypes, type horizSectionPropTypes } from '../../utils/types';
|
|
3
3
|
import { type NativeScrollEvent } from 'react-native';
|
|
4
4
|
export declare const useBarAndLineChartsWrapper: (props: BarAndLineChartsWrapperTypes) => {
|
|
5
5
|
containerHeightIncludingBelowXAxis: any;
|
|
@@ -59,40 +59,6 @@ export declare const useBarAndLineChartsWrapper: (props: BarAndLineChartsWrapper
|
|
|
59
59
|
totalWidth: number;
|
|
60
60
|
xAxisLabelsVerticalShift: any;
|
|
61
61
|
};
|
|
62
|
-
lineInBarChartProps:
|
|
63
|
-
|
|
64
|
-
initialSpacing: number;
|
|
65
|
-
spacing: number;
|
|
66
|
-
containerHeight: number;
|
|
67
|
-
lineConfig: any;
|
|
68
|
-
maxValue: any;
|
|
69
|
-
animatedWidth: any;
|
|
70
|
-
lineBehindBars: boolean;
|
|
71
|
-
points: string | any[];
|
|
72
|
-
arrowPoints: any;
|
|
73
|
-
data: any[];
|
|
74
|
-
totalWidth: number;
|
|
75
|
-
barWidth: number | undefined;
|
|
76
|
-
labelsExtraHeight: number;
|
|
77
|
-
scrollEventThrottle: number;
|
|
78
|
-
xAxisLabelsVerticalShift: any;
|
|
79
|
-
};
|
|
80
|
-
lineInBarChartProps2: {
|
|
81
|
-
lineConfig: any;
|
|
82
|
-
points: string | any[];
|
|
83
|
-
data: (import("../..").lineDataItem | import("../..").barDataItem | import("../..").stackDataItem)[] | undefined;
|
|
84
|
-
yAxisLabelWidth: number;
|
|
85
|
-
initialSpacing: number;
|
|
86
|
-
spacing: number;
|
|
87
|
-
containerHeight: number;
|
|
88
|
-
maxValue: any;
|
|
89
|
-
animatedWidth: any;
|
|
90
|
-
lineBehindBars: boolean;
|
|
91
|
-
arrowPoints: any;
|
|
92
|
-
totalWidth: number;
|
|
93
|
-
barWidth: number | undefined;
|
|
94
|
-
labelsExtraHeight: number;
|
|
95
|
-
scrollEventThrottle: number;
|
|
96
|
-
xAxisLabelsVerticalShift: any;
|
|
97
|
-
};
|
|
62
|
+
lineInBarChartProps: LineInBarChartPropsType;
|
|
63
|
+
lineInBarChartProps2: LineInBarChartPropsType;
|
|
98
64
|
};
|
|
@@ -38,7 +38,7 @@ import { useEffect, useState } from 'react';
|
|
|
38
38
|
import { AxesAndRulesDefaults, BarDefaults } from '../../utils/constants';
|
|
39
39
|
export var useBarAndLineChartsWrapper = function (props) {
|
|
40
40
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
|
|
41
|
-
var chartType = props.chartType, containerHeight = props.containerHeight, noOfSectionsBelowXAxis = props.noOfSectionsBelowXAxis, sectionColors = props.sectionColors, stepHeight = props.stepHeight, negativeStepHeight = props.negativeStepHeight, labelsExtraHeight = props.labelsExtraHeight, yAxisLabelWidth = props.yAxisLabelWidth, horizontal = props.horizontal, rtl = props.rtl, shiftX = props.shiftX, shiftY = props.shiftY, initialSpacing = props.initialSpacing, data = props.data, stackData = props.stackData, secondaryData = props.secondaryData, barWidth = props.barWidth, xAxisThickness = props.xAxisThickness, totalWidth = props.totalWidth, spacing = props.spacing, lineConfig = props.lineConfig, lineConfig2 = props.lineConfig2, maxValue = props.maxValue, lineData = props.lineData, lineData2 = props.lineData2, animatedWidth = props.animatedWidth, lineBehindBars = props.lineBehindBars, points = props.points, points2 = props.points2, arrowPoints = props.arrowPoints, width = props.width, horizSections = props.horizSections, endSpacing = props.endSpacing, horizontalRulesStyle = props.horizontalRulesStyle, noOfSections = props.noOfSections, showFractionalValues = props.showFractionalValues, axesAndRulesProps = props.axesAndRulesProps, yAxisLabelTexts = props.yAxisLabelTexts, yAxisOffset = props.yAxisOffset, rotateYAxisTexts = props.rotateYAxisTexts, pointerConfig = props.pointerConfig, getPointerProps = props.getPointerProps, pointerIndex = props.pointerIndex, pointerX = props.pointerX, pointerY = props.pointerY, scrollEventThrottle = props.scrollEventThrottle, endReachedOffset = props.endReachedOffset, isRTL = props.isRTL;
|
|
41
|
+
var chartType = props.chartType, containerHeight = props.containerHeight, noOfSectionsBelowXAxis = props.noOfSectionsBelowXAxis, sectionColors = props.sectionColors, stepHeight = props.stepHeight, negativeStepHeight = props.negativeStepHeight, labelsExtraHeight = props.labelsExtraHeight, yAxisLabelWidth = props.yAxisLabelWidth, horizontal = props.horizontal, rtl = props.rtl, shiftX = props.shiftX, shiftY = props.shiftY, initialSpacing = props.initialSpacing, data = props.data, stackData = props.stackData, secondaryData = props.secondaryData, barWidth = props.barWidth, xAxisThickness = props.xAxisThickness, totalWidth = props.totalWidth, spacing = props.spacing, lineConfig = props.lineConfig, lineConfig2 = props.lineConfig2, maxValue = props.maxValue, lineData = props.lineData, lineData2 = props.lineData2, animatedWidth = props.animatedWidth, lineBehindBars = props.lineBehindBars, points = props.points, points2 = props.points2, arrowPoints = props.arrowPoints, width = props.width, horizSections = props.horizSections, endSpacing = props.endSpacing, horizontalRulesStyle = props.horizontalRulesStyle, noOfSections = props.noOfSections, showFractionalValues = props.showFractionalValues, axesAndRulesProps = props.axesAndRulesProps, yAxisLabelTexts = props.yAxisLabelTexts, yAxisOffset = props.yAxisOffset, rotateYAxisTexts = props.rotateYAxisTexts, pointerConfig = props.pointerConfig, getPointerProps = props.getPointerProps, pointerIndex = props.pointerIndex, pointerX = props.pointerX, pointerY = props.pointerY, scrollEventThrottle = props.scrollEventThrottle, endReachedOffset = props.endReachedOffset, isRTL = props.isRTL, selectedIndex = props.selectedIndex;
|
|
42
42
|
var yAxisAtTop = rtl ? !props.yAxisAtTop : props.yAxisAtTop;
|
|
43
43
|
var hideOrigin = (_a = axesAndRulesProps.hideOrigin) !== null && _a !== void 0 ? _a : AxesAndRulesDefaults.hideOrigin;
|
|
44
44
|
var yAxisSide = (_b = axesAndRulesProps.yAxisSide) !== null && _b !== void 0 ? _b : AxesAndRulesDefaults.yAxisSide;
|
|
@@ -169,9 +169,10 @@ export var useBarAndLineChartsWrapper = function (props) {
|
|
|
169
169
|
barWidth: barWidth,
|
|
170
170
|
labelsExtraHeight: labelsExtraHeight,
|
|
171
171
|
scrollEventThrottle: scrollEventThrottle,
|
|
172
|
-
xAxisLabelsVerticalShift: xAxisLabelsVerticalShift
|
|
172
|
+
xAxisLabelsVerticalShift: xAxisLabelsVerticalShift,
|
|
173
|
+
selectedIndex: selectedIndex
|
|
173
174
|
};
|
|
174
|
-
var lineInBarChartProps2 = __assign(__assign({}, lineInBarChartProps), { lineConfig: lineConfig2, points: points2, data: lineData2 });
|
|
175
|
+
var lineInBarChartProps2 = __assign(__assign({}, lineInBarChartProps), { lineConfig: lineConfig2, points: points2, data: lineData2 !== null && lineData2 !== void 0 ? lineData2 : [] });
|
|
175
176
|
var extendedContainerHeight = containerHeight + overflowTop + 10;
|
|
176
177
|
var containerHeightIncludingBelowXAxis = extendedContainerHeight + noOfSectionsBelowXAxis * stepHeight;
|
|
177
178
|
var verticalLinesProps = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react'
|
|
2
2
|
import { AxesAndRulesDefaults, BarDefaults } from '../../utils/constants'
|
|
3
3
|
import {
|
|
4
|
+
LineInBarChartPropsType,
|
|
4
5
|
type BarAndLineChartsWrapperTypes,
|
|
5
6
|
type horizSectionPropTypes
|
|
6
7
|
} from '../../utils/types'
|
|
@@ -61,7 +62,8 @@ export const useBarAndLineChartsWrapper = (
|
|
|
61
62
|
|
|
62
63
|
scrollEventThrottle,
|
|
63
64
|
endReachedOffset,
|
|
64
|
-
isRTL
|
|
65
|
+
isRTL,
|
|
66
|
+
selectedIndex
|
|
65
67
|
} = props
|
|
66
68
|
|
|
67
69
|
const yAxisAtTop = rtl ? !props.yAxisAtTop : props.yAxisAtTop
|
|
@@ -237,7 +239,7 @@ export const useBarAndLineChartsWrapper = (
|
|
|
237
239
|
secondaryXAxis
|
|
238
240
|
}
|
|
239
241
|
|
|
240
|
-
const lineInBarChartProps = {
|
|
242
|
+
const lineInBarChartProps: LineInBarChartPropsType = {
|
|
241
243
|
yAxisLabelWidth,
|
|
242
244
|
initialSpacing,
|
|
243
245
|
spacing,
|
|
@@ -253,13 +255,14 @@ export const useBarAndLineChartsWrapper = (
|
|
|
253
255
|
barWidth,
|
|
254
256
|
labelsExtraHeight,
|
|
255
257
|
scrollEventThrottle,
|
|
256
|
-
xAxisLabelsVerticalShift
|
|
258
|
+
xAxisLabelsVerticalShift,
|
|
259
|
+
selectedIndex
|
|
257
260
|
}
|
|
258
|
-
const lineInBarChartProps2 = {
|
|
261
|
+
const lineInBarChartProps2: LineInBarChartPropsType = {
|
|
259
262
|
...lineInBarChartProps,
|
|
260
263
|
lineConfig: lineConfig2,
|
|
261
264
|
points: points2,
|
|
262
|
-
data: lineData2
|
|
265
|
+
data: lineData2 ?? []
|
|
263
266
|
}
|
|
264
267
|
const extendedContainerHeight = containerHeight + overflowTop + 10
|
|
265
268
|
const containerHeightIncludingBelowXAxis =
|
package/src/index.d.ts
CHANGED
|
@@ -35,4 +35,4 @@ export { getTopAndLeftForStripAndLabel } from './components/common/StripAndLabel
|
|
|
35
35
|
/***********************************************************************************************************************/
|
|
36
36
|
export { getCumulativeWidth, getLighterColor, svgQuadraticCurvePath, svgPath, bezierCommand, getSegmentString, getCurvePathWithSegments, getPreviousSegmentsLastPoint, getPathWithHighlight, getRegionPathObjects, getSegmentedPathObjects, getArrowPoints, getAxesAndRulesProps, getExtendedContainerHeightWithPadding, getSecondaryDataWithOffsetIncluded, getArrowProperty, getAllArrowProperties, maxAndMinUtil, computeMaxAndMinItems, getLabelTextUtil, getXForLineInBar, getYForLineInBar, clone, getLineConfigForBarChart, adjustToOffset } from './utils';
|
|
37
37
|
export { chartTypes, yAxisSides, loc, SEGMENT_START, SEGMENT_END, RANGE_ENTER, RANGE_EXIT, STOP, ruleTypes, AxesAndRulesDefaults, defaultArrowConfig, BarDefaults, defaultLineConfig, LineDefaults, defaultPointerConfig, pieColors, populationDefaults, defaultAnimationDuration } from './utils/constants';
|
|
38
|
-
export { type RuleType, type RuleTypes, type RulesConfig, CurveType, EdgePosition, type LabelsPosition, type PointerEvents, type secondaryYAxisType, type secondaryLineConfigType, type referenceConfigType, type arrowConfigType, type horizSectionPropTypes, type HorizSectionsType, type BarAndLineChartsWrapperTypes, type Pointer, type HighlightedRange, type LineSegment, type LineSvgProps, type LineProperties, type DataSet, Framework, type XAxisConfig } from './utils/types';
|
|
38
|
+
export { type RuleType, type RuleTypes, type RulesConfig, CurveType, EdgePosition, type LabelsPosition, type PointerEvents, type secondaryYAxisType, type secondaryLineConfigType, type referenceConfigType, type arrowConfigType, type horizSectionPropTypes, type HorizSectionsType, type BarAndLineChartsWrapperTypes, type Pointer, type HighlightedRange, type LineSegment, type LineSvgProps, type LineProperties, type DataSet, Framework, type XAxisConfig, type LineInBarChartPropsType, type DataPointProps } from './utils/types';
|
package/src/index.ts
CHANGED
package/src/utils/constants.d.ts
CHANGED
|
@@ -119,7 +119,6 @@ export declare const BarDefaults: {
|
|
|
119
119
|
focusedBarSideColor: string;
|
|
120
120
|
focusedBarTopColor: string;
|
|
121
121
|
};
|
|
122
|
-
export declare const defaultLineConfig: defaultLineConfigType;
|
|
123
122
|
export declare const LineDefaults: {
|
|
124
123
|
color: string;
|
|
125
124
|
curvature: number;
|
|
@@ -145,6 +144,7 @@ export declare const LineDefaults: {
|
|
|
145
144
|
dataPointsColor2: string;
|
|
146
145
|
dataPointsColor3: string;
|
|
147
146
|
dataPointsShape: string;
|
|
147
|
+
focusedDataPointColor: string;
|
|
148
148
|
textFontSize: number;
|
|
149
149
|
textColor: string;
|
|
150
150
|
startFillColor: string;
|
|
@@ -165,6 +165,7 @@ export declare const LineDefaults: {
|
|
|
165
165
|
edgePosition: EdgePosition;
|
|
166
166
|
endReachedOffset: number;
|
|
167
167
|
};
|
|
168
|
+
export declare const defaultLineConfig: defaultLineConfigType;
|
|
168
169
|
export declare const defaultPointerConfig: {
|
|
169
170
|
height: number;
|
|
170
171
|
width: number;
|
package/src/utils/constants.js
CHANGED
|
@@ -130,34 +130,6 @@ export var BarDefaults = {
|
|
|
130
130
|
focusedBarSideColor: '#776913',
|
|
131
131
|
focusedBarTopColor: '#C8D565'
|
|
132
132
|
};
|
|
133
|
-
export var defaultLineConfig = {
|
|
134
|
-
initialSpacing: BarDefaults.spacing, // gets updated to spacing before being used
|
|
135
|
-
curved: false,
|
|
136
|
-
curvature: defaultCurvature,
|
|
137
|
-
curveType: defaultCurveType,
|
|
138
|
-
isAnimated: false,
|
|
139
|
-
animationDuration: defaultAnimationDuration,
|
|
140
|
-
thickness: 1,
|
|
141
|
-
color: 'black',
|
|
142
|
-
hideDataPoints: false,
|
|
143
|
-
dataPointsShape: 'circular',
|
|
144
|
-
dataPointsWidth: 4,
|
|
145
|
-
dataPointsHeight: 4,
|
|
146
|
-
dataPointsColor: 'black',
|
|
147
|
-
dataPointsRadius: 3,
|
|
148
|
-
textColor: 'gray',
|
|
149
|
-
textFontSize: 10,
|
|
150
|
-
textShiftX: 0,
|
|
151
|
-
textShiftY: 0,
|
|
152
|
-
shiftX: 0,
|
|
153
|
-
shiftY: 0,
|
|
154
|
-
delay: 0,
|
|
155
|
-
startIndex: 0,
|
|
156
|
-
endIndex: 0, // gets updated to lineData.length - 1
|
|
157
|
-
showArrow: false,
|
|
158
|
-
arrowConfig: defaultArrowConfig,
|
|
159
|
-
isSecondary: false
|
|
160
|
-
};
|
|
161
133
|
// Line chart specific
|
|
162
134
|
export var LineDefaults = {
|
|
163
135
|
color: 'black',
|
|
@@ -184,6 +156,7 @@ export var LineDefaults = {
|
|
|
184
156
|
dataPointsColor2: 'blue',
|
|
185
157
|
dataPointsColor3: 'red',
|
|
186
158
|
dataPointsShape: 'circular',
|
|
159
|
+
focusedDataPointColor: 'orange',
|
|
187
160
|
textFontSize: 10,
|
|
188
161
|
textColor: 'gray',
|
|
189
162
|
startFillColor: 'gray',
|
|
@@ -204,6 +177,37 @@ export var LineDefaults = {
|
|
|
204
177
|
edgePosition: EdgePosition.AFTER_DATA_POINT,
|
|
205
178
|
endReachedOffset: defaultEndReachedOffset
|
|
206
179
|
};
|
|
180
|
+
export var defaultLineConfig = {
|
|
181
|
+
initialSpacing: BarDefaults.spacing, // gets updated to spacing before being used
|
|
182
|
+
curved: false,
|
|
183
|
+
curvature: defaultCurvature,
|
|
184
|
+
curveType: defaultCurveType,
|
|
185
|
+
isAnimated: false,
|
|
186
|
+
animationDuration: defaultAnimationDuration,
|
|
187
|
+
thickness: 1,
|
|
188
|
+
color: 'black',
|
|
189
|
+
hideDataPoints: false,
|
|
190
|
+
dataPointsShape: 'circular',
|
|
191
|
+
dataPointsWidth: 4,
|
|
192
|
+
dataPointsHeight: 4,
|
|
193
|
+
dataPointsColor: 'black',
|
|
194
|
+
dataPointsRadius: 3,
|
|
195
|
+
textColor: 'gray',
|
|
196
|
+
textFontSize: 10,
|
|
197
|
+
textShiftX: 0,
|
|
198
|
+
textShiftY: 0,
|
|
199
|
+
shiftX: 0,
|
|
200
|
+
shiftY: 0,
|
|
201
|
+
delay: 0,
|
|
202
|
+
startIndex: 0,
|
|
203
|
+
endIndex: 0, // gets updated to lineData.length - 1
|
|
204
|
+
showArrow: false,
|
|
205
|
+
arrowConfig: defaultArrowConfig,
|
|
206
|
+
isSecondary: false,
|
|
207
|
+
focusEnabled: false,
|
|
208
|
+
focusedDataPointColor: LineDefaults.focusedDataPointColor,
|
|
209
|
+
focusedDataPointRadius: LineDefaults.dataPointsRadius,
|
|
210
|
+
};
|
|
207
211
|
export var defaultPointerConfig = {
|
|
208
212
|
height: 0,
|
|
209
213
|
width: 0,
|
package/src/utils/constants.ts
CHANGED
|
@@ -156,35 +156,6 @@ export const BarDefaults = {
|
|
|
156
156
|
focusedBarTopColor: '#C8D565'
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
export const defaultLineConfig: defaultLineConfigType = {
|
|
160
|
-
initialSpacing: BarDefaults.spacing, // gets updated to spacing before being used
|
|
161
|
-
curved: false,
|
|
162
|
-
curvature: defaultCurvature,
|
|
163
|
-
curveType: defaultCurveType,
|
|
164
|
-
isAnimated: false,
|
|
165
|
-
animationDuration: defaultAnimationDuration,
|
|
166
|
-
thickness: 1,
|
|
167
|
-
color: 'black',
|
|
168
|
-
hideDataPoints: false,
|
|
169
|
-
dataPointsShape: 'circular',
|
|
170
|
-
dataPointsWidth: 4,
|
|
171
|
-
dataPointsHeight: 4,
|
|
172
|
-
dataPointsColor: 'black',
|
|
173
|
-
dataPointsRadius: 3,
|
|
174
|
-
textColor: 'gray',
|
|
175
|
-
textFontSize: 10,
|
|
176
|
-
textShiftX: 0,
|
|
177
|
-
textShiftY: 0,
|
|
178
|
-
shiftX: 0,
|
|
179
|
-
shiftY: 0,
|
|
180
|
-
delay: 0,
|
|
181
|
-
startIndex: 0,
|
|
182
|
-
endIndex: 0, // gets updated to lineData.length - 1
|
|
183
|
-
showArrow: false,
|
|
184
|
-
arrowConfig: defaultArrowConfig,
|
|
185
|
-
isSecondary: false
|
|
186
|
-
}
|
|
187
|
-
|
|
188
159
|
// Line chart specific
|
|
189
160
|
|
|
190
161
|
export const LineDefaults = {
|
|
@@ -213,6 +184,7 @@ export const LineDefaults = {
|
|
|
213
184
|
dataPointsColor2: 'blue',
|
|
214
185
|
dataPointsColor3: 'red',
|
|
215
186
|
dataPointsShape: 'circular',
|
|
187
|
+
focusedDataPointColor: 'orange',
|
|
216
188
|
|
|
217
189
|
textFontSize: 10,
|
|
218
190
|
textColor: 'gray',
|
|
@@ -237,6 +209,38 @@ export const LineDefaults = {
|
|
|
237
209
|
endReachedOffset: defaultEndReachedOffset
|
|
238
210
|
}
|
|
239
211
|
|
|
212
|
+
export const defaultLineConfig: defaultLineConfigType = {
|
|
213
|
+
initialSpacing: BarDefaults.spacing, // gets updated to spacing before being used
|
|
214
|
+
curved: false,
|
|
215
|
+
curvature: defaultCurvature,
|
|
216
|
+
curveType: defaultCurveType,
|
|
217
|
+
isAnimated: false,
|
|
218
|
+
animationDuration: defaultAnimationDuration,
|
|
219
|
+
thickness: 1,
|
|
220
|
+
color: 'black',
|
|
221
|
+
hideDataPoints: false,
|
|
222
|
+
dataPointsShape: 'circular',
|
|
223
|
+
dataPointsWidth: 4,
|
|
224
|
+
dataPointsHeight: 4,
|
|
225
|
+
dataPointsColor: 'black',
|
|
226
|
+
dataPointsRadius: 3,
|
|
227
|
+
textColor: 'gray',
|
|
228
|
+
textFontSize: 10,
|
|
229
|
+
textShiftX: 0,
|
|
230
|
+
textShiftY: 0,
|
|
231
|
+
shiftX: 0,
|
|
232
|
+
shiftY: 0,
|
|
233
|
+
delay: 0,
|
|
234
|
+
startIndex: 0,
|
|
235
|
+
endIndex: 0, // gets updated to lineData.length - 1
|
|
236
|
+
showArrow: false,
|
|
237
|
+
arrowConfig: defaultArrowConfig,
|
|
238
|
+
isSecondary: false,
|
|
239
|
+
focusEnabled: false,
|
|
240
|
+
focusedDataPointColor: LineDefaults.focusedDataPointColor,
|
|
241
|
+
focusedDataPointRadius: LineDefaults.dataPointsRadius,
|
|
242
|
+
}
|
|
243
|
+
|
|
240
244
|
export const defaultPointerConfig = {
|
|
241
245
|
height: 0,
|
|
242
246
|
width: 0,
|
package/src/utils/index.js
CHANGED
|
@@ -749,7 +749,7 @@ export var clone = function (obj) {
|
|
|
749
749
|
return temp;
|
|
750
750
|
};
|
|
751
751
|
export var getLineConfigForBarChart = function (lineConfig, barInitialSpacing) {
|
|
752
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19;
|
|
752
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22;
|
|
753
753
|
return {
|
|
754
754
|
initialSpacing: (_b = (_a = lineConfig.initialSpacing) !== null && _a !== void 0 ? _a : barInitialSpacing) !== null && _b !== void 0 ? _b : defaultLineConfig.initialSpacing,
|
|
755
755
|
spacing: lineConfig.spacing,
|
|
@@ -787,7 +787,11 @@ export var getLineConfigForBarChart = function (lineConfig, barInitialSpacing) {
|
|
|
787
787
|
showArrowBase: (_17 = (_16 = lineConfig.arrowConfig) === null || _16 === void 0 ? void 0 : _16.showArrowBase) !== null && _17 !== void 0 ? _17 : (_18 = defaultLineConfig.arrowConfig) === null || _18 === void 0 ? void 0 : _18.showArrowBase
|
|
788
788
|
},
|
|
789
789
|
customDataPoint: lineConfig.customDataPoint,
|
|
790
|
-
isSecondary: (_19 = lineConfig.isSecondary) !== null && _19 !== void 0 ? _19 : defaultLineConfig.isSecondary
|
|
790
|
+
isSecondary: (_19 = lineConfig.isSecondary) !== null && _19 !== void 0 ? _19 : defaultLineConfig.isSecondary,
|
|
791
|
+
focusEnabled: (_20 = lineConfig.focusEnabled) !== null && _20 !== void 0 ? _20 : defaultLineConfig.focusEnabled,
|
|
792
|
+
focusedDataPointColor: (_21 = lineConfig.focusedDataPointColor) !== null && _21 !== void 0 ? _21 : defaultLineConfig.focusedDataPointColor,
|
|
793
|
+
focusedDataPointRadius: (_22 = lineConfig.focusedDataPointRadius) !== null && _22 !== void 0 ? _22 : defaultLineConfig.focusedDataPointRadius,
|
|
794
|
+
focusedDataPointIndex: lineConfig.focusedDataPointIndex
|
|
791
795
|
};
|
|
792
796
|
};
|
|
793
797
|
export var getNoOfSections = function (noOfSections, maxValue, stepValue) {
|
package/src/utils/index.ts
CHANGED
|
@@ -1241,7 +1241,15 @@ export const getLineConfigForBarChart = (
|
|
|
1241
1241
|
defaultLineConfig.arrowConfig?.showArrowBase
|
|
1242
1242
|
},
|
|
1243
1243
|
customDataPoint: lineConfig.customDataPoint,
|
|
1244
|
-
isSecondary: lineConfig.isSecondary ?? defaultLineConfig.isSecondary
|
|
1244
|
+
isSecondary: lineConfig.isSecondary ?? defaultLineConfig.isSecondary,
|
|
1245
|
+
focusEnabled: lineConfig.focusEnabled ?? defaultLineConfig.focusEnabled,
|
|
1246
|
+
focusedDataPointColor:
|
|
1247
|
+
lineConfig.focusedDataPointColor ??
|
|
1248
|
+
defaultLineConfig.focusedDataPointColor,
|
|
1249
|
+
focusedDataPointRadius:
|
|
1250
|
+
lineConfig.focusedDataPointRadius ??
|
|
1251
|
+
defaultLineConfig.focusedDataPointRadius,
|
|
1252
|
+
focusedDataPointIndex: lineConfig.focusedDataPointIndex
|
|
1245
1253
|
}
|
|
1246
1254
|
}
|
|
1247
1255
|
|
package/src/utils/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ColorValue } from 'react-native';
|
|
2
2
|
import { type chartTypes, type yAxisSides } from './constants';
|
|
3
3
|
import { type lineDataItem } from '../LineChart/types';
|
|
4
|
-
import { type barDataItem, type stackDataItem } from '../BarChart/types';
|
|
4
|
+
import { lineConfigType, type barDataItem, type stackDataItem } from '../BarChart/types';
|
|
5
5
|
export declare enum Framework {
|
|
6
6
|
reactJS = 0,
|
|
7
7
|
reactNative = 1
|
|
@@ -98,6 +98,41 @@ export interface secondaryLineConfigType {
|
|
|
98
98
|
arrowConfig?: arrowConfigType;
|
|
99
99
|
isSecondary?: boolean;
|
|
100
100
|
}
|
|
101
|
+
export interface ExtendedLineConfigType extends lineConfigType {
|
|
102
|
+
startIndex: number;
|
|
103
|
+
endIndex: number;
|
|
104
|
+
dataPointsHeight: number;
|
|
105
|
+
}
|
|
106
|
+
export interface LineInBarChartPropsType {
|
|
107
|
+
yAxisLabelWidth: number;
|
|
108
|
+
initialSpacing: number;
|
|
109
|
+
spacing: number;
|
|
110
|
+
containerHeight: number;
|
|
111
|
+
lineConfig: ExtendedLineConfigType;
|
|
112
|
+
maxValue: number;
|
|
113
|
+
animatedWidth: number;
|
|
114
|
+
lineBehindBars: boolean;
|
|
115
|
+
points: any;
|
|
116
|
+
arrowPoints: any;
|
|
117
|
+
data: any[];
|
|
118
|
+
totalWidth: number;
|
|
119
|
+
barWidth?: number;
|
|
120
|
+
labelsExtraHeight: number;
|
|
121
|
+
scrollEventThrottle: number;
|
|
122
|
+
xAxisLabelsVerticalShift: number;
|
|
123
|
+
selectedIndex: number;
|
|
124
|
+
}
|
|
125
|
+
export interface DataPointProps {
|
|
126
|
+
data: any[];
|
|
127
|
+
lineConfig: ExtendedLineConfigType;
|
|
128
|
+
barWidth?: number;
|
|
129
|
+
containerHeight: number;
|
|
130
|
+
maxValue: number;
|
|
131
|
+
firstBarWidth: number;
|
|
132
|
+
yAxisLabelWidth: number;
|
|
133
|
+
spacing: number;
|
|
134
|
+
selectedIndex: number;
|
|
135
|
+
}
|
|
101
136
|
export interface referenceConfigType {
|
|
102
137
|
thickness?: number;
|
|
103
138
|
width?: number;
|
|
@@ -213,6 +248,7 @@ export interface BarAndLineChartsWrapperTypes {
|
|
|
213
248
|
scrollToIndex: number | undefined;
|
|
214
249
|
scrollAnimation: boolean;
|
|
215
250
|
indicatorColor: 'black' | 'default' | 'white' | undefined;
|
|
251
|
+
selectedIndex: number;
|
|
216
252
|
setSelectedIndex: any;
|
|
217
253
|
spacing: number;
|
|
218
254
|
showLine: boolean;
|
package/src/utils/types.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ColorValue } from 'react-native'
|
|
2
2
|
import { type chartTypes, type yAxisSides } from './constants'
|
|
3
3
|
import { type lineDataItem } from '../LineChart/types'
|
|
4
|
-
import { type barDataItem, type stackDataItem } from '../BarChart/types'
|
|
4
|
+
import { lineConfigType, type barDataItem, type stackDataItem } from '../BarChart/types'
|
|
5
5
|
|
|
6
6
|
export enum Framework {
|
|
7
7
|
reactJS,
|
|
@@ -112,6 +112,44 @@ export interface secondaryLineConfigType {
|
|
|
112
112
|
isSecondary?: boolean
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
export interface ExtendedLineConfigType extends lineConfigType {
|
|
116
|
+
startIndex: number
|
|
117
|
+
endIndex: number
|
|
118
|
+
dataPointsHeight: number
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface LineInBarChartPropsType {
|
|
122
|
+
yAxisLabelWidth: number
|
|
123
|
+
initialSpacing: number
|
|
124
|
+
spacing: number
|
|
125
|
+
containerHeight: number
|
|
126
|
+
lineConfig: ExtendedLineConfigType
|
|
127
|
+
maxValue: number
|
|
128
|
+
animatedWidth: number
|
|
129
|
+
lineBehindBars: boolean
|
|
130
|
+
points: any
|
|
131
|
+
arrowPoints: any
|
|
132
|
+
data: any[]
|
|
133
|
+
totalWidth: number
|
|
134
|
+
barWidth?: number
|
|
135
|
+
labelsExtraHeight: number
|
|
136
|
+
scrollEventThrottle: number
|
|
137
|
+
xAxisLabelsVerticalShift: number
|
|
138
|
+
selectedIndex: number
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface DataPointProps {
|
|
142
|
+
data: any[];
|
|
143
|
+
lineConfig: ExtendedLineConfigType;
|
|
144
|
+
barWidth?: number;
|
|
145
|
+
containerHeight: number;
|
|
146
|
+
maxValue: number;
|
|
147
|
+
firstBarWidth: number;
|
|
148
|
+
yAxisLabelWidth: number;
|
|
149
|
+
spacing: number;
|
|
150
|
+
selectedIndex: number;
|
|
151
|
+
}
|
|
152
|
+
|
|
115
153
|
export interface referenceConfigType {
|
|
116
154
|
thickness?: number
|
|
117
155
|
width?: number
|
|
@@ -239,6 +277,7 @@ export interface BarAndLineChartsWrapperTypes {
|
|
|
239
277
|
scrollToIndex: number | undefined
|
|
240
278
|
scrollAnimation: boolean
|
|
241
279
|
indicatorColor: 'black' | 'default' | 'white' | undefined
|
|
280
|
+
selectedIndex: number
|
|
242
281
|
setSelectedIndex: any
|
|
243
282
|
spacing: number
|
|
244
283
|
showLine: boolean
|