volodfast 1e39131c38
feat: drag select timeframe on charts (#2018)
* feat: add drag select functionality to chart

* fix: use redux stored values for time frame selection

* fix: ignore clicks on chart without dragging

* feat: add intersection cursor to chart

* refactor: update drag-select chart plugin

* fix: respond to drag-select mouseup outside of chart

* fix: remove unnecessary chart update

* feat: add drag-select to dashboard charts

* refactor: add util functions to create custom plugin options

* fix: enable custom chart plugins

Co-authored-by: Palash Gupta <palashgdev@gmail.com>
Co-authored-by: Ankit Nayan <ankit@signoz.io>
2023-01-17 17:00:34 +05:30

28 lines
587 B
TypeScript

import {
applyMiddleware,
compose,
legacy_createStore as createStore,
} from 'redux';
import thunk, { ThunkMiddleware } from 'redux-thunk';
import AppActions from 'types/actions';
import reducers, { AppState } from './reducers';
const composeEnhancers =
(window && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose;
const store = createStore(
reducers,
composeEnhancers(
applyMiddleware(thunk as ThunkMiddleware<AppState, AppActions>),
),
);
export type AppDispatch = typeof store.dispatch;
if (window !== undefined) {
window.store = store;
}
export default store;