Skip to content

Commit fd1e4c2

Browse files
Merge pull request #690 from plotly/demo_bump
give demo same data as dev
2 parents fc0b985 + e15c136 commit fd1e4c2

File tree

4 files changed

+31
-39
lines changed

4 files changed

+31
-39
lines changed

dev/App.js

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,13 @@ import AceEditor from 'react-ace';
88
import Select from 'react-select';
99
import PlotlyEditor, {DefaultEditor, Panel} from '../src';
1010
import Inspector from 'react-inspector';
11-
import tips from './tips';
11+
import dataSources from './dataSources';
1212
import 'brace/mode/json';
1313
import 'brace/theme/textmate';
1414

1515
// https://github.com/plotly/react-chart-editor#mapbox-access-tokens
1616
import ACCESS_TOKENS from '../accessTokens';
1717

18-
const dataSources = {
19-
ints: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], // eslint-disable-line no-magic-numbers
20-
'jagged ints': [2, 1, 3, 5, 4, 6], // eslint-disable-line no-magic-numbers
21-
'toggle ints': [1, -1, 1, -1, 1, -1], // eslint-disable-line no-magic-numbers
22-
'big ints': [1000, 10100, 10000, 20000, 100000], // eslint-disable-line no-magic-numbers
23-
dates: [
24-
'2010-01-01',
25-
'2010-07-01',
26-
'2011-01-01',
27-
'2011-07-01',
28-
'2012-01-01',
29-
'2012-06-01',
30-
],
31-
months: ['January', 'February', 'March', 'April', 'May', 'June'],
32-
colors: ['red', 'orange', 'yellow', 'green', 'blue', 'indigo'],
33-
'blue and red': ['blue', 'red'],
34-
countries: [
35-
'Angola',
36-
'Albania',
37-
'United Arab Emirates',
38-
'Argentina',
39-
'Armenia',
40-
'Australia',
41-
'Austria',
42-
'Azerbaijan',
43-
],
44-
'countries iso': ['AGO', 'ALB', 'ARE', 'ARG', 'ARM', 'AUS', 'AUT', 'AZE'],
45-
states: ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA'],
46-
...tips,
47-
};
4818
const dataSourceOptions = Object.keys(dataSources).map(name => ({
4919
value: name,
5020
label: name,

dev/tips.js renamed to dev/dataSources.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,4 +1723,32 @@ export default {
17231723
2,
17241724
2,
17251725
],
1726+
1727+
ints: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],
1728+
'jagged ints': [2, 1, 3, 5, 4, 6],
1729+
'toggle ints': [1, -1, 1, -1, 1, -1],
1730+
'big ints': [1000, 10100, 10000, 20000, 100000],
1731+
dates: [
1732+
'2010-01-01',
1733+
'2010-07-01',
1734+
'2011-01-01',
1735+
'2011-07-01',
1736+
'2012-01-01',
1737+
'2012-06-01',
1738+
],
1739+
months: ['January', 'February', 'March', 'April', 'May', 'June'],
1740+
colors: ['red', 'orange', 'yellow', 'green', 'blue', 'indigo'],
1741+
'blue and red': ['blue', 'red'],
1742+
countries: [
1743+
'Angola',
1744+
'Albania',
1745+
'United Arab Emirates',
1746+
'Argentina',
1747+
'Armenia',
1748+
'Australia',
1749+
'Austria',
1750+
'Azerbaijan',
1751+
],
1752+
'countries iso': ['AGO', 'ALB', 'ARE', 'ARG', 'ARM', 'AUS', 'AUT', 'AZE'],
1753+
states: ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA'],
17261754
};

examples/demo/src/App.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,8 @@ import plotly from 'plotly.js/dist/plotly';
33
import PlotlyEditor from 'react-chart-editor';
44
import 'react-chart-editor/lib/react-chart-editor.css';
55
import Nav from './Nav';
6+
import dataSources from './dataSources';
67

7-
const dataSources = {
8-
col1: ['Jan', 'Feb', 'Mar'], // eslint-disable-line no-magic-numbers
9-
col2: [1, 2, 3],
10-
col3: [4, 3, 2], // eslint-disable-line no-magic-numbers
11-
col4: [17, 13, 9], // eslint-disable-line no-magic-numbers
12-
col5: ['blue'],
13-
col6: ['yellow', 'green', 'yellow'],
14-
};
158
const dataSourceOptions = Object.keys(dataSources).map(name => ({
169
value: name,
1710
label: name,

examples/demo/src/dataSources.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../dev/dataSources.js

0 commit comments

Comments
 (0)