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 11import { 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" ;
43import { fallback , pprint } from "../utils/json" ;
4+ import { EditorStore , EditorStoreState } from "./EditorStore" ;
55
66export type EditorStoreInitializer = ( ) => EditorStoreState ;
77
@@ -37,6 +37,6 @@ export function initStateFromProps(data: Array<Partial<Data>>): EditorStoreIniti
3737 return ( ) => ( {
3838 layout : pprint ( fallback ( "" ) ) ,
3939 config : pprint ( fallback ( "" ) ) ,
40- data : data . map ( trace => pprint ( fallback ( trace . name ) ) )
40+ data : data . map ( trace => pprint ( JSON . stringify ( trace ) ) )
4141 } ) ;
4242}
You can’t perform that action at this time.
0 commit comments