gifted-charts-core 0.1.34 → 0.1.36
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/dist/BarChart/RenderStackBars.js +10 -3
- package/dist/BarChart/index.d.ts +11 -3
- package/dist/BarChart/index.js +165 -111
- package/dist/BarChart/types.d.ts +33 -2
- package/dist/LineChart/LineChartBiColor.js +7 -7
- package/dist/LineChart/index.d.ts +1 -0
- package/dist/LineChart/index.js +321 -273
- package/dist/LineChart/types.d.ts +2 -0
- package/dist/components/BarAndLineChartsWrapper/getHorizSectionsVals.js +43 -43
- package/dist/components/BarAndLineChartsWrapper/index.js +12 -15
- package/dist/utils/index.d.ts +11 -2
- package/dist/utils/index.js +76 -32
- package/dist/utils/types.d.ts +5 -1
- package/package.json +1 -1
|
@@ -28,11 +28,11 @@ import { AxesAndRulesDefaults, LineDefaults, chartTypes } from '../utils/constan
|
|
|
28
28
|
import { getAxesAndRulesProps, getExtendedContainerHeightWithPadding } from '../utils';
|
|
29
29
|
var initialData = null;
|
|
30
30
|
export var useLineChartBiColor = function (props) {
|
|
31
|
-
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, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50;
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
31
|
+
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, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51;
|
|
32
|
+
var _52 = __read(useState(false), 2), toggle = _52[0], setToggle = _52[1];
|
|
33
|
+
var _53 = __read(useState([]), 2), pointsArray = _53[0], setPointsArray = _53[1];
|
|
34
|
+
var _54 = __read(useState([]), 2), fillPointsArray = _54[0], setFillPointsArray = _54[1];
|
|
35
|
+
var _55 = __read(useState(-1), 2), selectedIndex = _55[0], setSelectedIndex = _55[1];
|
|
36
36
|
var containerHeight = (_a = props.height) !== null && _a !== void 0 ? _a : AxesAndRulesDefaults.containerHeight;
|
|
37
37
|
var noOfSections = (_b = props.noOfSections) !== null && _b !== void 0 ? _b : AxesAndRulesDefaults.noOfSections;
|
|
38
38
|
var data = useMemo(function () {
|
|
@@ -419,7 +419,7 @@ export var useLineChartBiColor = function (props) {
|
|
|
419
419
|
horizontalRulesStyle: horizontalRulesStyle,
|
|
420
420
|
noOfSections: noOfSections,
|
|
421
421
|
showFractionalValues: showFractionalValues,
|
|
422
|
-
axesAndRulesProps: getAxesAndRulesProps(props, stepValue,
|
|
422
|
+
axesAndRulesProps: getAxesAndRulesProps(props, containerHeight, stepHeight, stepValue, noOfSections, (_50 = props.roundToDigits) !== null && _50 !== void 0 ? _50 : 0, 0, 0, 0, false, 0),
|
|
423
423
|
yAxisLabelTexts: props.yAxisLabelTexts,
|
|
424
424
|
yAxisOffset: props.yAxisOffset,
|
|
425
425
|
rotateYAxisTexts: 0,
|
|
@@ -434,7 +434,7 @@ export var useLineChartBiColor = function (props) {
|
|
|
434
434
|
pointerIndex: 0,
|
|
435
435
|
pointerX: 0,
|
|
436
436
|
pointerY: 0,
|
|
437
|
-
endReachedOffset: (
|
|
437
|
+
endReachedOffset: (_51 = props.endReachedOffset) !== null && _51 !== void 0 ? _51 : LineDefaults.endReachedOffset,
|
|
438
438
|
extraWidthDueToDataPoint: extraWidthDueToDataPoint
|
|
439
439
|
};
|
|
440
440
|
return {
|
|
@@ -325,6 +325,7 @@ export declare const useLineChart: (props: extendedLineChartPropsType) => {
|
|
|
325
325
|
xAxisLabelsVerticalShift: number;
|
|
326
326
|
horizontalRulesStyle: any;
|
|
327
327
|
showFractionalValues: boolean;
|
|
328
|
+
roundToDigits: number;
|
|
328
329
|
horizontal: boolean;
|
|
329
330
|
yAxisAtTop: boolean;
|
|
330
331
|
pointerConfig: import("../utils/types").Pointer | undefined;
|