File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/shared/charts/src/helpers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { Data } from "plotly.js-dist-min" ;
2
- import { useState , useReducer , useEffect } from "react" ;
3
- import { EditorStore , EditorStoreState } from "./EditorStore" ;
2
+ import { useEffect , useReducer , useState } from "react" ;
4
3
import { fallback , pprint } from "../utils/json" ;
4
+ import { EditorStore , EditorStoreState } from "./EditorStore" ;
5
5
6
6
export type EditorStoreInitializer = ( ) => EditorStoreState ;
7
7
@@ -37,6 +37,6 @@ export function initStateFromProps(data: Array<Partial<Data>>): EditorStoreIniti
37
37
return ( ) => ( {
38
38
layout : pprint ( fallback ( "" ) ) ,
39
39
config : pprint ( fallback ( "" ) ) ,
40
- data : data . map ( trace => pprint ( fallback ( trace . name ) ) )
40
+ data : data . map ( trace => pprint ( JSON . stringify ( trace ) ) )
41
41
} ) ;
42
42
}
You can’t perform that action at this time.
0 commit comments