Skip to content

Commit 71e212b

Browse files
committed
Convert to simplified colorbar logic
Added colorscale mock
1 parent a34dafa commit 71e212b

File tree

3 files changed

+29
-53
lines changed

3 files changed

+29
-53
lines changed

src/traces/parcats/colorbar.js

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/traces/parcats/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ Parcats.attributes = require('./attributes');
1414
Parcats.supplyDefaults = require('./defaults');
1515
Parcats.calc = require('./calc');
1616
Parcats.plot = require('./plot');
17-
Parcats.colorbar = require('./colorbar');
17+
Parcats.colorbar = {
18+
container: 'line',
19+
min: 'cmin',
20+
max: 'cmax'
21+
};
1822

1923
Parcats.moduleType = 'trace';
2024
Parcats.name = 'parcats';
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"data": [
3+
{"type": "parcats",
4+
"domain": {"x": [0.125, 0.625],"y": [0.25, 0.75]},
5+
"dimensions":[
6+
{"label": "One", "values": [1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 1, 1]},
7+
{"label": "Two", "values": ["A", "B", "A", "B", "C", "C", "A", "B", "C", "B", "C", "B", "C", "B", "C", "B", "C", "B", "A", "A"]},
8+
{"label": "Three", "values": [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11]}],
9+
"bundlecolors": true,
10+
"line": {
11+
"color": [0, 0, 1, 1, 0, 1, 0, 0, 0, 2, 2, 2, 2, 1, 2, 1, 0, 2, 1, 2],
12+
"shape": "linear",
13+
"showscale": true,
14+
"colorscale": "Viridis"
15+
}
16+
}
17+
],
18+
"layout": {
19+
"height": 602,
20+
"width": 592,
21+
"margin": {
22+
"l": 40, "r": 40, "t": 50, "b": 40
23+
}}
24+
}

0 commit comments

Comments
 (0)