source: node_modules/recharts/lib/state/rootPropsSlice.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[a762898]1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.updateOptions = exports.rootPropsReducer = exports.initialState = void 0;
7var _toolkit = require("@reduxjs/toolkit");
8/**
9 * These are chart options that users can choose - which means they can also
10 * choose to change them which should trigger a re-render.
11 */
12
13var initialState = exports.initialState = {
14 accessibilityLayer: true,
15 barCategoryGap: '10%',
16 barGap: 4,
17 barSize: undefined,
18 className: undefined,
19 maxBarSize: undefined,
20 stackOffset: 'none',
21 syncId: undefined,
22 syncMethod: 'index',
23 baseValue: undefined,
24 reverseStackOrder: false
25};
26var rootPropsSlice = (0, _toolkit.createSlice)({
27 name: 'rootProps',
28 initialState,
29 reducers: {
30 updateOptions: (state, action) => {
31 var _action$payload$barGa;
32 state.accessibilityLayer = action.payload.accessibilityLayer;
33 state.barCategoryGap = action.payload.barCategoryGap;
34 state.barGap = (_action$payload$barGa = action.payload.barGap) !== null && _action$payload$barGa !== void 0 ? _action$payload$barGa : initialState.barGap;
35 state.barSize = action.payload.barSize;
36 state.maxBarSize = action.payload.maxBarSize;
37 state.stackOffset = action.payload.stackOffset;
38 state.syncId = action.payload.syncId;
39 state.syncMethod = action.payload.syncMethod;
40 state.className = action.payload.className;
41 state.baseValue = action.payload.baseValue;
42 state.reverseStackOrder = action.payload.reverseStackOrder;
43 }
44 }
45});
46var rootPropsReducer = exports.rootPropsReducer = rootPropsSlice.reducer;
47var {
48 updateOptions
49} = rootPropsSlice.actions;
50exports.updateOptions = updateOptions;
Note: See TracBrowser for help on using the repository browser.