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';
1212import tips from './tips' ;
1313import 'brace/mode/json' ;
1414import 'brace/theme/textmate' ;
15+ import { categoryLayout , traceTypes , chartCategory } from 'lib/traceTypes' ;
1516
1617// https://github.com/plotly/react-chart-editor#mapbox-access-tokens
1718import ACCESS_TOKENS from '../accessTokens' ;
@@ -41,6 +42,41 @@ const dataSourceOptions = Object.keys(dataSources).map(name => ({
4142
4243const config = { mapboxAccessToken : ACCESS_TOKENS . MAPBOX , editable : true } ;
4344
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+
4480class App extends Component {
4581 constructor ( ) {
4682 super ( ) ;
@@ -120,6 +156,8 @@ class App extends Component {
120156 debug
121157 advancedTraceTypeSelector
122158 showFieldTooltips
159+ traceTypesConfig = { traceTypesConfig }
160+ useAsDefaultTrace = { { type : 'scattergl' } }
123161 >
124162 < DefaultEditor >
125163 < GraphTransformsPanel group = "Dev" name = "Transforms" />
You can’t perform that action at this time.
0 commit comments