Add colors and move capability to charts

This commit is contained in:
Thomas Nordquist
2019-06-17 18:08:35 +02:00
parent 0f9c2cd36f
commit 8c1c6387c9
13 changed files with 301 additions and 20 deletions

View File

@@ -106,6 +106,18 @@ export const removeChart = (chartParameters: ChartParameters) => async (
dispatch(saveCharts())
}
export const moveChartUp = (parameters: { topic: string; dotPath?: string }) => async (
dispatch: Dispatch<any>,
getState: () => AppState
) => {
dispatch({
topic: parameters.topic,
dotPath: parameters.dotPath,
type: ActionTypes.CHARTS_MOVE_UP,
})
dispatch(saveCharts())
}
export const setCharts = (charts: Array<ChartParameters>): Action => {
return {
charts,