Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fbf4202

Browse files
committedJul 6, 2017
squashed changes
1 parent 8f0f78b commit fbf4202

File tree

11 files changed

+1699
-585
lines changed

11 files changed

+1699
-585
lines changed
 

‎src/traces/parcoords/lines.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function palette(unitToColor, context, opacity) {
106106
// but first it shifts the sample index by 0, 8 or 16 bits depending on rgbIndex [0..2]
107107
// with the end result that each line will be of a unique color, making it possible for the pick handler
108108
// to uniquely identify which line is hovered over (bijective mapping).
109-
// The inverse, i.e. readPixel is invoked from 'parcoords.js'
109+
// The inverse, i.e. readPixel is invoked from 'render.js'
110110
function calcPickColor(j, rgbIndex) {
111111
return (j >>> 8 * rgbIndex) % 256 / 255;
112112
}

‎src/traces/table/attributes.js

Lines changed: 207 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@
88

99
'use strict';
1010

11-
var colorAttributes = require('../../components/colorscale/color_attributes');
12-
var colorbarAttrs = require('../../components/colorbar/attributes');
13-
var colorscales = require('../../components/colorscale/scales');
14-
var axesAttrs = require('../../plots/cartesian/layout_attributes');
11+
var annAttrs = require('../../components/annotations/attributes');
1512
var fontAttrs = require('../../plots/font_attributes');
1613

17-
var extendDeep = require('../../lib/extend').extendDeep;
1814
var extendFlat = require('../../lib/extend').extendFlat;
1915

2016
module.exports = {
@@ -52,46 +48,132 @@ module.exports = {
5248
description: 'Sets the font for the `dimension` labels.'
5349
}),
5450

55-
dimensions: {
56-
_isLinkedToArray: 'dimension',
57-
label: {
58-
valType: 'string',
51+
labels: {
52+
valType: 'data_array',
53+
role: 'info',
54+
dflt: [],
55+
description: 'The shown name of the columns.'
56+
},
57+
58+
columnwidth: {
59+
valType: 'number',
60+
arrayOk: true,
61+
dflt: null,
62+
role: 'style',
63+
description: 'The width of cells.'
64+
},
65+
66+
header: {
67+
68+
values: {
69+
valType: 'data_array',
5970
role: 'info',
60-
description: 'The shown name of the dimension.'
71+
dflt: [],
72+
description: [
73+
'Dimension values. `values[n]` represents the value of the `n`th point in the dataset,',
74+
'therefore the `values` vector for all dimensions must be the same (longer vectors',
75+
'will be truncated). Each value must be a finite number.'
76+
].join(' ')
6177
},
62-
tickvals: axesAttrs.tickvals,
63-
ticktext: axesAttrs.ticktext,
64-
font: extendFlat({}, fontAttrs, {
65-
description: 'Sets the font for the `dimension` values.'
66-
}),
67-
valueformat: {
68-
valType: 'string',
69-
dflt: '3s',
70-
role: 'style',
78+
79+
format: {
80+
valType: 'data_array',
81+
role: 'info',
82+
dflt: [],
7183
description: [
72-
'Sets the tick label formatting rule using d3 formatting mini-language',
84+
'Sets the cell value formatting rule using d3 formatting mini-language',
7385
'which is similar to those of Python. See',
7486
'https://github.com/d3/d3-format/blob/master/README.md#locale_format'
75-
].join(' ')
87+
]
7688
},
77-
visible: {
78-
valType: 'boolean',
79-
dflt: true,
80-
role: 'info',
81-
description: 'Shows the dimension when set to `true` (the default). Hides the dimension for `false`.'
89+
90+
prefix: {
91+
valType: 'string',
92+
arrayOk: true,
93+
dflt: null,
94+
role: 'style',
95+
description: 'Prefix for cell values.'
8296
},
83-
range: {
84-
valType: 'info_array',
85-
role: 'info',
86-
items: [
87-
{valType: 'number'},
88-
{valType: 'number'}
89-
],
90-
description: [
91-
'The domain range for the purpose of coloring. Defaults to the `values` extent.',
92-
'Must be an array of `[fromValue, toValue]` with finite numbers as elements.'
93-
].join(' ')
97+
98+
suffix: {
99+
valType: 'string',
100+
arrayOk: true,
101+
dflt: null,
102+
role: 'style',
103+
description: 'Suffix for cell values.'
104+
},
105+
106+
height: {
107+
valType: 'number',
108+
arrayOk: false,
109+
dflt: 28,
110+
role: 'style',
111+
description: 'The height of cells.'
112+
},
113+
114+
align: extendFlat({}, annAttrs.align, {arrayOk: true}),
115+
valign: extendFlat({}, annAttrs.valign, {arrayOk: true}),
116+
117+
line: {
118+
width: {
119+
valType: 'number',
120+
arrayOk: true,
121+
role: 'style'
122+
},
123+
color: {
124+
valType: 'color',
125+
arrayOk: true,
126+
role: 'style'
127+
}
94128
},
129+
130+
fill: {
131+
color: {
132+
valType: 'color',
133+
arrayOk: true,
134+
role: 'style',
135+
description: [
136+
'Sets the cell fill color. It accepts either a specific color',
137+
' or an array of colors.'
138+
].join('')
139+
}
140+
},
141+
142+
font: {
143+
family: {
144+
valType: 'string',
145+
arrayOk: true,
146+
role: 'style',
147+
noBlank: true,
148+
strict: true,
149+
description: [
150+
'HTML font family - the typeface that will be applied by the web browser.',
151+
'The web browser will only be able to apply a font if it is available on the system',
152+
'which it operates. Provide multiple font families, separated by commas, to indicate',
153+
'the preference in which to apply fonts if they aren\'t available on the system.',
154+
'The plotly service (at https://plot.ly or on-premise) generates images on a server,',
155+
'where only a select number of',
156+
'fonts are installed and supported.',
157+
'These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,',
158+
'*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,',
159+
'*PT Sans Narrow*, *Raleway*, *Times New Roman*.'
160+
].join(' ')
161+
},
162+
size: {
163+
valType: 'number',
164+
arrayOk: true,
165+
role: 'style'
166+
},
167+
color: {
168+
valType: 'color',
169+
arrayOk: true,
170+
role: 'style'
171+
}
172+
}
173+
},
174+
175+
cells: {
176+
95177
values: {
96178
valType: 'data_array',
97179
role: 'info',
@@ -102,53 +184,100 @@ module.exports = {
102184
'will be truncated). Each value must be a finite number.'
103185
].join(' ')
104186
},
105-
description: 'The dimensions (variables) of the table view.'
106-
},
107187

108-
line: extendFlat({},
109-
110-
// the default autocolorscale is set to Viridis - autocolorscale therefore defaults to false too,
111-
// to avoid being overridden by the blue-white-red autocolor palette
112-
extendDeep(
113-
{},
114-
colorAttributes('line'),
115-
{
116-
colorscale: extendDeep(
117-
{},
118-
colorAttributes('line').colorscale,
119-
{dflt: colorscales.Viridis}
120-
),
121-
autocolorscale: extendDeep(
122-
{},
123-
colorAttributes('line').autocolorscale,
124-
{
125-
dflt: false,
126-
description: [
127-
'Has an effect only if line.color` is set to a numerical array.',
128-
'Determines whether the colorscale is a default palette (`autocolorscale: true`)',
129-
'or the palette determined by `line.colorscale`.',
130-
'In case `colorscale` is unspecified or `autocolorscale` is true, the default ',
131-
'palette will be chosen according to whether numbers in the `color` array are',
132-
'all positive, all negative or mixed.',
133-
'The default value is false, so that `table` colorscale can default to `Viridis`.'
134-
].join(' ')
135-
}
136-
)
188+
format: {
189+
valType: 'data_array',
190+
role: 'info',
191+
dflt: [],
192+
description: [
193+
'Sets the cell value formatting rule using d3 formatting mini-language',
194+
'which is similar to those of Python. See',
195+
'https://github.com/d3/d3-format/blob/master/README.md#locale_format'
196+
]
197+
},
198+
199+
prefix: {
200+
valType: 'string',
201+
arrayOk: true,
202+
dflt: null,
203+
role: 'style',
204+
description: 'Prefix for cell values.'
205+
},
137206

207+
suffix: {
208+
valType: 'string',
209+
arrayOk: true,
210+
dflt: null,
211+
role: 'style',
212+
description: 'Suffix for cell values.'
213+
},
214+
215+
height: {
216+
valType: 'number',
217+
arrayOk: false,
218+
dflt: 20,
219+
role: 'style',
220+
description: 'The height of cells.'
221+
},
222+
223+
align: extendFlat({}, annAttrs.align, {arrayOk: true}),
224+
valign: extendFlat({}, annAttrs.valign, {arrayOk: true}),
225+
226+
line: {
227+
width: {
228+
valType: 'number',
229+
arrayOk: true,
230+
role: 'style'
231+
},
232+
color: {
233+
valType: 'color',
234+
arrayOk: true,
235+
role: 'style'
236+
}
237+
},
238+
239+
fill: {
240+
color: {
241+
valType: 'color',
242+
arrayOk: true,
243+
role: 'style',
244+
description: [
245+
'Sets the cell fill color. It accepts either a specific color',
246+
' or an array of colors.'
247+
].join('')
138248
}
139-
),
249+
},
140250

141-
{
142-
showscale: {
143-
valType: 'boolean',
144-
role: 'info',
145-
dflt: false,
251+
font: {
252+
family: {
253+
valType: 'string',
254+
arrayOk: true,
255+
role: 'style',
256+
noBlank: true,
257+
strict: true,
146258
description: [
147-
'Has an effect only if `line.color` is set to a numerical array.',
148-
'Determines whether or not a colorbar is displayed.'
259+
'HTML font family - the typeface that will be applied by the web browser.',
260+
'The web browser will only be able to apply a font if it is available on the system',
261+
'which it operates. Provide multiple font families, separated by commas, to indicate',
262+
'the preference in which to apply fonts if they aren\'t available on the system.',
263+
'The plotly service (at https://plot.ly or on-premise) generates images on a server,',
264+
'where only a select number of',
265+
'fonts are installed and supported.',
266+
'These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,',
267+
'*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,',
268+
'*PT Sans Narrow*, *Raleway*, *Times New Roman*.'
149269
].join(' ')
150270
},
151-
colorbar: colorbarAttrs
271+
size: {
272+
valType: 'number',
273+
arrayOk: true,
274+
role: 'style'
275+
},
276+
color: {
277+
valType: 'color',
278+
arrayOk: true,
279+
role: 'style'
280+
}
152281
}
153-
)
282+
}
154283
};

‎src/traces/table/calc.js

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,6 @@
88

99
'use strict';
1010

11-
var hasColorscale = require('../../components/colorscale/has_colorscale');
12-
var calcColorscale = require('../../components/colorscale/calc');
13-
var Lib = require('../../lib');
14-
15-
module.exports = function calc(gd, trace) {
16-
var cs = !!trace.line.colorscale && Lib.isArray(trace.line.color);
17-
var color = cs ? trace.line.color : Array.apply(0, Array(trace.dimensions.reduce(function(p, n) {return Math.max(p, n.values.length);}, 0))).map(function() {return 0.5;});
18-
var cscale = cs ? trace.line.colorscale : [[0, trace.line.color], [1, trace.line.color]];
19-
20-
if(hasColorscale(trace, 'line')) {
21-
calcColorscale(trace, trace.line.color, 'line', 'c');
22-
}
23-
24-
return [{
25-
lineColor: color,
26-
cscale: cscale
27-
}];
11+
module.exports = function calc() {
12+
return [{}];
2813
};

‎src/traces/table/constants.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,11 @@
1111
module.exports = {
1212
maxDimensionCount: 60,
1313
overdrag: 45,
14+
cellPad: 4,
1415
columnTitleOffset: 28,
1516
columnExtentOffset: 10,
16-
bar: {
17-
width: 4, // Visible width of the filter bar
18-
capturewidth: 10, // Mouse-sensitive width for interaction (Fitts law)
19-
fillcolor: 'magenta', // Color of the filter bar fill
20-
fillopacity: 1, // Filter bar fill opacity
21-
strokecolor: 'white', // Color of the filter bar side lines
22-
strokeopacity: 1, // Filter bar side stroke opacity
23-
strokewidth: 1, // Filter bar side stroke width in pixels
24-
handleheight: 16, // Height of the filter bar vertical resize areas on top and bottom
25-
handleopacity: 1, // Opacity of the filter bar vertical resize areas on top and bottom
26-
handleoverlap: 0 // A larger than 0 value causes overlaps with the filter bar, represented as pixels.'
27-
}
17+
transitionEase: 'cubic-out',
18+
transitionDuration: 100,
19+
releaseTransitionEase: 'elastic',
20+
releaseTransitionDuration: 300
2821
};

‎src/traces/table/defaults.js

Lines changed: 28 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -10,95 +10,46 @@
1010

1111
var Lib = require('../../lib');
1212
var attributes = require('./attributes');
13-
var hasColorscale = require('../../components/colorscale/has_colorscale');
14-
var colorscaleDefaults = require('../../components/colorscale/defaults');
15-
var maxDimensionCount = require('./constants').maxDimensionCount;
16-
17-
function handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce) {
18-
19-
if(hasColorscale(traceIn, 'line')) {
20-
coerce('line.colorscale');
21-
colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'line.', cLetter: 'c'});
22-
}
23-
}
24-
25-
function dimensionsDefaults(traceIn, traceOut, fontDflt) {
26-
var dimensionsIn = traceIn.dimensions || [],
27-
dimensionsOut = traceOut.dimensions = [];
28-
29-
var dimensionIn, dimensionOut, i;
30-
var commonLength = Infinity;
31-
32-
if(dimensionsIn.length > maxDimensionCount) {
33-
Lib.log('table views support up to ' + maxDimensionCount + ' dimensions at the moment');
34-
dimensionsIn.splice(maxDimensionCount);
35-
}
36-
37-
function coerce(attr, dflt) {
38-
return Lib.coerce(dimensionIn, dimensionOut, attributes.dimensions, attr, dflt);
39-
}
40-
41-
for(i = 0; i < dimensionsIn.length; i++) {
42-
dimensionIn = dimensionsIn[i];
43-
dimensionOut = {};
44-
45-
if(!Lib.isPlainObject(dimensionIn)) {
46-
continue;
47-
}
48-
49-
var values = coerce('values');
50-
var visible = coerce('visible', values.length > 0);
51-
52-
if(visible) {
53-
coerce('label');
54-
coerce('tickvals');
55-
coerce('ticktext');
56-
coerce('valueformat');
57-
coerce('range');
58-
Lib.coerceFont(coerce, 'font', fontDflt);
59-
60-
commonLength = Math.min(commonLength, dimensionOut.values.length);
61-
}
62-
63-
dimensionOut._index = i;
64-
dimensionsOut.push(dimensionOut);
65-
}
66-
67-
if(isFinite(commonLength)) {
68-
for(i = 0; i < dimensionsOut.length; i++) {
69-
dimensionOut = dimensionsOut[i];
70-
if(dimensionOut.visible && dimensionOut.values.length > commonLength) {
71-
dimensionOut.values = dimensionOut.values.slice(0, commonLength);
72-
}
73-
}
74-
}
75-
76-
return dimensionsOut;
77-
}
7813

7914
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
8015
function coerce(attr, dflt) {
8116
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
8217
}
8318

84-
// make default font size 10px,
85-
// scale linearly with global font size
8619
var fontDflt = {
8720
family: layout.font.family,
88-
size: Math.round(layout.font.size * (10 / 12)),
21+
size: layout.font.size,
8922
color: layout.font.color
9023
};
9124

92-
var dimensions = dimensionsDefaults(traceIn, traceOut, fontDflt);
93-
94-
handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);
95-
9625
coerce('domain.x');
9726
coerce('domain.y');
9827

99-
if(!Array.isArray(dimensions) || !dimensions.length) {
100-
traceOut.visible = false;
101-
}
102-
103-
Lib.coerceFont(coerce, 'labelfont', fontDflt);
28+
coerce('labels');
29+
30+
coerce('columnwidth');
31+
32+
coerce('cells.values');
33+
coerce('cells.format');
34+
coerce('cells.align');
35+
coerce('cells.valign');
36+
coerce('cells.prefix');
37+
coerce('cells.suffix');
38+
coerce('cells.height');
39+
coerce('cells.line.width');
40+
coerce('cells.line.color');
41+
coerce('cells.fill.color');
42+
Lib.coerceFont(coerce, 'cells.font', fontDflt);
43+
44+
coerce('header.values');
45+
coerce('header.format');
46+
coerce('header.align');
47+
coerce('header.valign');
48+
coerce('header.prefix');
49+
coerce('header.suffix');
50+
coerce('header.height');
51+
coerce('header.line.width');
52+
coerce('header.line.color');
53+
coerce('header.fill.color');
54+
Lib.coerceFont(coerce, 'header.font', fontDflt);
10455
};

‎src/traces/table/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Table.attributes = require('./attributes');
1414
Table.supplyDefaults = require('./defaults');
1515
Table.calc = require('./calc');
1616
Table.plot = require('./plot');
17-
Table.colorbar = require('./colorbar');
1817

1918
Table.moduleType = 'trace';
2019
Table.name = 'table';

‎src/traces/table/plot.js

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ module.exports = function plot(gd, cdTable) {
1616
var svg = fullLayout._paper;
1717
var root = fullLayout._paperdiv;
1818

19-
var gdDimensions = {};
20-
var gdDimensionsOriginalOrder = {};
19+
var gdColumns = {};
20+
var gdColumnsOriginalOrder = {};
2121

2222
var size = fullLayout._size;
2323

2424
cdTable.forEach(function(d, i) {
25-
gdDimensions[i] = gd.data[i].dimensions;
26-
gdDimensionsOriginalOrder[i] = gd.data[i].dimensions.slice();
25+
gdColumns[i] = gd.data[i].header.values.map(function(d) {return d[0];});
26+
gdColumnsOriginalOrder[i] = gdColumns[i].slice();
2727
});
2828

2929
var hover = function(eventData) {
@@ -34,46 +34,28 @@ module.exports = function plot(gd, cdTable) {
3434
gd.emit('plotly_unhover', eventData);
3535
};
3636

37-
var columnMoved = function(i, visibleIndices) {
37+
var columnMoved = function(i, indices) {
3838

39-
// Have updated order data on `gd.data` and raise `Plotly.restyle` event
40-
// without having to incur heavy UI blocking due to an actual `Plotly.restyle` call
41-
42-
function visible(dimension) {return !('visible' in dimension) || dimension.visible;}
43-
44-
function newIdx(visibleIndices, orig, dim) {
39+
function newIdx(indices, orig, dim) {
4540
var origIndex = orig.indexOf(dim);
46-
var currentIndex = visibleIndices.indexOf(origIndex);
41+
var currentIndex = indices.indexOf(origIndex);
4742
if(currentIndex === -1) {
48-
// invisible dimensions initially go to the end
4943
currentIndex += orig.length;
5044
}
5145
return currentIndex;
5246
}
5347

5448
function sorter(orig) {
5549
return function sorter(d1, d2) {
56-
var i1 = newIdx(visibleIndices, orig, d1);
57-
var i2 = newIdx(visibleIndices, orig, d2);
50+
var i1 = newIdx(indices, orig, d1);
51+
var i2 = newIdx(indices, orig, d2);
5852
return i1 - i2;
5953
};
6054
}
6155

62-
// drag&drop sorting of the visible dimensions
63-
var orig = sorter(gdDimensionsOriginalOrder[i].filter(visible));
64-
gdDimensions[i].sort(orig);
65-
66-
// invisible dimensions are not interpreted in the context of drag&drop sorting as an invisible dimension
67-
// cannot be dragged; they're interspersed into their original positions by this subsequent merging step
68-
gdDimensionsOriginalOrder[i].filter(function(d) {return !visible(d);})
69-
.sort(function(d) {
70-
// subsequent splicing to be done left to right, otherwise indices may be incorrect
71-
return gdDimensionsOriginalOrder[i].indexOf(d);
72-
})
73-
.forEach(function(d) {
74-
gdDimensions[i].splice(gdDimensions[i].indexOf(d), 1); // remove from the end
75-
gdDimensions[i].splice(gdDimensionsOriginalOrder[i].indexOf(d), 0, d); // insert at original index
76-
});
56+
// drag&drop sorting of the columns
57+
var orig = sorter(gdColumnsOriginalOrder[i].slice());
58+
gdColumns[i].sort(orig);
7759

7860
gd.emit('plotly_restyle');
7961
};

‎src/traces/table/render.js

Lines changed: 239 additions & 284 deletions
Large diffs are not rendered by default.

‎test/image/mocks/table.json

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"layout": {
3+
"width": 1200,
4+
"height": 800,
5+
"title": "Widget parameters and cost",
6+
"font": {
7+
"color": "blue",
8+
"size": 200,
9+
"family": "sans-serif"
10+
},
11+
"margin": {"t": 106, "r": 60, "b": 54, "l": 60}
12+
},
13+
14+
"data": [{
15+
16+
"type": "table",
17+
18+
"domain": {
19+
"x": [0.05, 0.95],
20+
"y": [0.02, 0.97]
21+
},
22+
23+
"columnwidth": [110, 60, 90, 90, 80, 70, 80, 60, 100, 70],
24+
25+
"header": {
26+
27+
"values": [
28+
["Height"],
29+
["Width"],
30+
["Cylinder"],
31+
["Weight"],
32+
["Cost"],
33+
["Penalty"],
34+
["H/W"],
35+
["Min H/W"],
36+
["Diameter"],
37+
["RF block"]
38+
],
39+
40+
"align": ["right", "center", "center", "right", "right", "right", "left", "right", "right", "right"],
41+
"valign": "middle",
42+
43+
"line": {
44+
"color": "lightgray",
45+
"width": 0.5
46+
},
47+
48+
"fill": {
49+
"color": "grey"
50+
},
51+
52+
"font": {
53+
"family": "PT Sans Narrow",
54+
"size": 16,
55+
"color": "white"
56+
}
57+
},
58+
59+
"cells": {
60+
61+
"values": [
62+
[32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666, 32000, 162666],
63+
[268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 379086, 600000, 489543, 268630, 600000, 379086, 268630, 489543, 379086, 600000],
64+
["A", "A", "B", "AB", "Y", "Z", "Z", "A", "B", "B", "Y", "Y", "Z", "A", "A", "B", "Y", "Y", "Z", "Z"],
65+
[160, 1324, 252, 1711, 173, 624, 228, 2474, 371, 3103, 312, 2408, 460, 1727, 754, 2457, 227, 1963, 354, 2797],
66+
[1125, 9274, 2735, 16920, 2193, 20704, 4814, 34689, 5565, 46554, 5225, 38887, 9746, 37715, 17798, 55250, 5697, 49083, 11226, 81939],
67+
[9, 794, 34, 1409, 17, 536, 39, 7133, 115, 9843, 107, 7017, 273, 5131, 1210, 9032, 82, 7312, 252, 16778],
68+
[0.2366, 0.3269, 0.3471, 0.4373, 0.4575, 0.106, 0.568, 0.2164, 0.2366, 0.3269, 0.3471, 0.4373, 0.4575, 0.106, 0.568, 0.2164, 0.2366, 0.3269, 0.3471, 0.4373],
69+
[5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, -5909, 102666, -16955, 135803, -28000, 124758, 5137, 113712, -5909, 102666],
70+
[98453, 319366, 234498, 455411, 391333, 147711, 479081, 208910, 124041, 344954, 280876, 501789, 368624, 98453, 429823, 234498, 170419, 391333, 258167, 479081],
71+
[1417, 23377, 3376, 33336, 5635, 10812, 6898, 21273, 2484, 35126, 5626, 51096, 7384, 22020, 18912, 52449, 7498, 87528, 11359, 107154]
72+
],
73+
74+
"format": [
75+
".2s",
76+
"#0x",
77+
null,
78+
[",.0f", ",.1f", ",.2f", ",.3f", ",.2f"],
79+
"$,",
80+
"_>5",
81+
",.1%",
82+
".3s",
83+
",.0f",
84+
",.0f"
85+
],
86+
87+
"prefix": ["", "", "", "", "US ", ""],
88+
"suffix": ["m", ""],
89+
90+
"height": 24,
91+
92+
"align": ["right", "center", "center", "right", "right", "right", "left", "right", "right", "right"],
93+
"valign": "middle",
94+
95+
"line": {
96+
"color": [
97+
"grey"
98+
],
99+
"width": 0.5
100+
},
101+
102+
"fill": {
103+
"color": [
104+
["#f7fbff", "#deebf7", "#f7fbff", "#deebf7", "#f7fbff", "#deebf7", "#f7fbff", "#deebf7", "#f7fbff", "#deebf7", "#f7fbff", "#deebf7", "#f7fbff", "#deebf7", "#f7fbff", "#deebf7", "#f7fbff", "#deebf7", "#f7fbff", "#deebf7"]
105+
]
106+
},
107+
108+
"font": {
109+
"size": 12,
110+
"color": ["black", "red", "black", "black"]
111+
}
112+
}
113+
}]
114+
}

‎test/image/mocks/table_large.json

Lines changed: 119 additions & 85 deletions
Large diffs are not rendered by default.

‎test/jasmine/tests/table_test.js

Lines changed: 972 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.