File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import Inspector from 'react-inspector';
12
12
import tips from './tips' ;
13
13
import 'brace/mode/json' ;
14
14
import 'brace/theme/textmate' ;
15
+ import { categoryLayout , traceTypes , chartCategory } from 'lib/traceTypes' ;
15
16
16
17
// https://github.com/plotly/react-chart-editor#mapbox-access-tokens
17
18
import ACCESS_TOKENS from '../accessTokens' ;
@@ -41,6 +42,41 @@ const dataSourceOptions = Object.keys(dataSources).map(name => ({
41
42
42
43
const config = { mapboxAccessToken : ACCESS_TOKENS . MAPBOX , editable : true } ;
43
44
45
+ const traceTypesConfig = {
46
+ traces : _ => ( [
47
+ {
48
+ value : 'scattergl' ,
49
+ icon : 'scatter' ,
50
+ label : _ ( 'Scatter' ) ,
51
+ } ,
52
+ {
53
+ value : 'bar' ,
54
+ label : _ ( 'Bar' ) ,
55
+ } ,
56
+ {
57
+ value : 'histogram' ,
58
+ label : _ ( 'Histogram' ) ,
59
+ } ,
60
+ {
61
+ value : 'table' ,
62
+ label : _ ( 'Table' ) ,
63
+ } ,
64
+ {
65
+ value : 'pie' ,
66
+ label : _ ( 'Pie' ) ,
67
+ } ,
68
+ {
69
+ value : 'box' ,
70
+ label : _ ( 'Box' ) ,
71
+ } ,
72
+ {
73
+ value : 'histogram2d' ,
74
+ label : _ ( 'Histogram 2D' ) ,
75
+ } ,
76
+ ] ) ,
77
+ complex : true
78
+ } ;
79
+
44
80
class App extends Component {
45
81
constructor ( ) {
46
82
super ( ) ;
@@ -120,6 +156,8 @@ class App extends Component {
120
156
debug
121
157
advancedTraceTypeSelector
122
158
showFieldTooltips
159
+ traceTypesConfig = { traceTypesConfig }
160
+ useAsDefaultTrace = { { type : 'scattergl' } }
123
161
>
124
162
< DefaultEditor >
125
163
< GraphTransformsPanel group = "Dev" name = "Transforms" />
You can’t perform that action at this time.
0 commit comments