Skip to content

Commit

Permalink
Convert to simplified colorbar logic
Browse files Browse the repository at this point in the history
Added colorscale mock
  • Loading branch information
jonmmease committed Aug 8, 2018
1 parent a34dafa commit 71e212b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 53 deletions.
52 changes: 0 additions & 52 deletions src/traces/parcats/colorbar.js

This file was deleted.

6 changes: 5 additions & 1 deletion src/traces/parcats/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ Parcats.attributes = require('./attributes');
Parcats.supplyDefaults = require('./defaults');
Parcats.calc = require('./calc');
Parcats.plot = require('./plot');
Parcats.colorbar = require('./colorbar');
Parcats.colorbar = {
container: 'line',
min: 'cmin',
max: 'cmax'
};

Parcats.moduleType = 'trace';
Parcats.name = 'parcats';
Expand Down
24 changes: 24 additions & 0 deletions test/image/mocks/parcats_colorbar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"data": [
{"type": "parcats",
"domain": {"x": [0.125, 0.625],"y": [0.25, 0.75]},
"dimensions":[
{"label": "One", "values": [1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 1, 1]},
{"label": "Two", "values": ["A", "B", "A", "B", "C", "C", "A", "B", "C", "B", "C", "B", "C", "B", "C", "B", "C", "B", "A", "A"]},
{"label": "Three", "values": [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11]}],
"bundlecolors": true,
"line": {
"color": [0, 0, 1, 1, 0, 1, 0, 0, 0, 2, 2, 2, 2, 1, 2, 1, 0, 2, 1, 2],
"shape": "linear",
"showscale": true,
"colorscale": "Viridis"
}
}
],
"layout": {
"height": 602,
"width": 592,
"margin": {
"l": 40, "r": 40, "t": 50, "b": 40
}}
}

0 comments on commit 71e212b

Please sign in to comment.