Skip to content

Commit a87a4a9

Browse files
authored
Release 1.10 (#521)
* update docs * update libraries * add properly named map file * update versions for 1.10 * Fix samples and update versions in package.json
1 parent 23fa307 commit a87a4a9

File tree

80 files changed

+23507
-1055
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+23507
-1055
lines changed

Samples/VizImage/vizImage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" ></script>
1515

1616
<!-- Extensions Library (this will be hosted on a CDN eventually) -->
17-
<script src="../../lib/tableau.extensions.1.latest.js"></script>
17+
<script src="../../lib/tableau.extensions.1.latest.min.js"></script>
1818

1919
<!-- Our extension's code -->
2020
<script src="./vizImage.js"></script>

Samples/VizImage2/VizImage2.trex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<author name="tableau" email="[email protected]" organization="tableau" website="https://www.tableau.com"/>
88
<min-api-version>1.6</min-api-version>
99
<source-location>
10-
<url>http://localhost:8765/Samples/VizImage/vizImage2.html</url>
10+
<url>http://localhost:8765/Samples/VizImage2/vizImage2.html</url>
1111
</source-location>
1212
<icon>iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAlhJREFUOI2Nkt9vy1EYh5/3bbsvRSySCZbIxI+ZCKsN2TKtSFyIrV2WuRCJuBiJWxfuxCVXbvwFgiEtposgLFJElnbU1SxIZIIRJDKTrdu+53Uhra4mce7Oe57Pcz7JOULFisViwZ+29LAzOSjQYDgz1ZcCvWuXV11MJpN+OS/lm6179teqH0yDqxPTCyKSA8DcDsyOmOprnCaeP7459pdgy969i0LTC3IO/RQMyoHcQN+3cnljW3dNIFC47qDaK3g7BwdTkwBaBELT4ZPOUVWgKl4ZBnjxJPUlMDnTDrp0pmr6RHFeEjjcUUXPDGeSEwDN0Xg8sivxMhJNjGzbHd8PkM3eHRfkrBM5NkcQaY2vUnTlrDIA0NoaX+KLXFFlowr14tvVpqb2MICzmQcKqxvbumv+NAhZGCCIPwEw6QWXKYRL/VUXO0+rAUJiPwAk5MIlgVfwPjjHLCL1APmHN94ZdqeYN+NW/mn6I4BvwQYchcLnwFhJMDiYmlRxAzjpKWZkYkUCcZ2I61wi37tLbYyjiN0fHk5Oz3nGSLSzBbNHCF35R7f6K1/hN9PRhek11FrymfQQQKB4+Gl05P2qNRtmETlXW7e+b2z01dfycGNbfFMAbqNyKp9Jp4rzOT8RYFs0njJkc2iqsCObvTsOsDWWqA5C1uFy+Uz/oXJeKwVT4h0RmPUXhi79vuC0Ku6yOffTK3g9lfxfDQAisY516sg5kfOCiJk7HoLt2cf9b/9LANAc7dznm98PagG1fUOZ9IP5uMB8Q4CPoyNvausapkTt3rNMuvdf3C/o6+czhtdwmwAAAABJRU5ErkJggg==</icon>
1313
</dashboard-extension>

Samples/VizImage2/vizImage2.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" >
1414
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" ></script>
1515

16-
<!-- Extensions Library (this will be hosted on a CDN eventually) -->
17-
<script src="./lib/tableau.extensions.1.latest.js"></script>
16+
<script src="../../lib/tableau.extensions.1.latest.min.js"></script>
1817

1918
<!-- Our extension's code -->
2019
<script src="./vizImage2.js"></script>

Samples/VizImage2/vizImage2.js

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -4,80 +4,80 @@
44
(function () {
55
$(document).ready(function () {
66
tableau.extensions.initializeAsync().then(function () {
7-
addVizImage(tableau.MarkType.Bar, tableau.MarkType.Bar, 'tableau20_10_0' );
7+
addVizImage(tableau.MarkType.Bar, tableau.MarkType.Bar, 'tableau20_10_0');
88

9-
let markSelector1 = $('#mark-select1');
10-
let markSelector2 = $('#mark-select2');
11-
let colorSelector = $('#color-select');
9+
const markSelector1 = $('#mark-select1');
10+
const markSelector2 = $('#mark-select2');
11+
const colorSelector = $('#color-select');
1212

1313
markSelector1.prop('disabled', false);
1414
markSelector2.prop('disabled', false);
1515
colorSelector.prop('disabled', false);
1616

1717
// updating viz images with new values upon a selector change.
1818
markSelector1.change(function () {
19-
addVizImage(markSelector1.val(), markSelector2.val(), colorSelector.val() );
19+
addVizImage(markSelector1.val(), markSelector2.val(), colorSelector.val());
2020
});
2121
markSelector2.change(function () {
22-
addVizImage(markSelector1.val(), markSelector2.val(), colorSelector.val() );
22+
addVizImage(markSelector1.val(), markSelector2.val(), colorSelector.val());
2323
});
2424
colorSelector.change(function () {
2525
addVizImage(markSelector1.val(), markSelector2.val(), colorSelector.val());
2626
});
27-
});
27+
});
2828
});
2929

30-
function addVizImage (markType1, markType2, colorType) {
30+
function addVizImage (markType1, markType2, colorType) {
3131
const vizInputSpec = {
32-
version: 2,
33-
description: 'Example QQConcat viz',
34-
data: {
35-
values: [
36-
{ Segment: 'Consumer', ShipMode: 'First Class', Category: 'Technology', Profit: 11560.75, Sales: 61089.43 },
37-
{ Segment: 'Corporate', ShipMode: 'First Class', Category: 'Technology', Profit: 7235.75, Sales: 39201.43 },
38-
{ Segment: 'Home Office', ShipMode: 'First Class', Category: 'Technology', Profit: 8706.75, Sales: 39074.43 },
39-
{ Segment: 'Consumer', ShipMode: 'First Class', Category: 'Office Supplies', Profit: 7734.74, Sales: 48200.43 },
40-
{ Segment: 'Corporate', ShipMode: 'First Class', Category: 'Office Supplies', Profit: 6299.74, Sales: 31579.43 },
41-
{ Segment: 'Home Office', ShipMode: 'First Class', Category: 'Office Supplies', Profit: 4366.74, Sales: 21552.43 },
42-
{ Segment: 'Consumer', ShipMode: 'First Class', Category: 'Furniture', Profit: 2078.74, Sales: 49880.43 },
43-
{ Segment: 'Corporate', ShipMode: 'First Class', Category: 'Furniture', Profit: 929.75, Sales: 35077.43 },
44-
{ Segment: 'Home Office', ShipMode: 'First Class', Category: 'Furniture', Profit: 58.74, Sales: 25773.43 },
45-
{ Segment: 'Consumer', ShipMode: 'Second Class', Category: 'Technology', Profit: 14430.75, Sales: 72942.43 },
46-
{ Segment: 'Corporate', ShipMode: 'Second Class', Category: 'Technology', Profit: 6819.74, Sales: 41912.43 },
47-
{ Segment: 'Home Office', ShipMode: 'Second Class', Category: 'Technology', Profit: 4902.75, Sales: 27366.43 },
48-
{ Segment: 'Consumer', ShipMode: 'Second Class', Category: 'Office Supplies', Profit: 9752.74, Sales: 71757.43 },
49-
{ Segment: 'Corporate', ShipMode: 'Second Class', Category: 'Office Supplies', Profit: 9809.74, Sales: 62810.43 },
50-
{ Segment: 'Home Office', ShipMode: 'Second Class', Category: 'Office Supplies', Profit: 7506.74, Sales: 26115.43 },
51-
{ Segment: 'Consumer', ShipMode: 'Second Class', Category: 'Furniture', Profit: 763.74, Sales: 86799.43 },
52-
{ Segment: 'Corporate', ShipMode: 'Second Class', Category: 'Furniture', Profit: 1596.74, Sales: 41403.43 },
53-
{ Segment: 'Home Office', ShipMode: 'Second Class', Category: 'Furniture', Profit: 1865.74, Sales: 28086.43 },
54-
],
32+
version: 2,
33+
description: 'Example QQConcat viz',
34+
data: {
35+
values: [
36+
{ Segment: 'Consumer', ShipMode: 'First Class', Category: 'Technology', Profit: 11560.75, Sales: 61089.43 },
37+
{ Segment: 'Corporate', ShipMode: 'First Class', Category: 'Technology', Profit: 7235.75, Sales: 39201.43 },
38+
{ Segment: 'Home Office', ShipMode: 'First Class', Category: 'Technology', Profit: 8706.75, Sales: 39074.43 },
39+
{ Segment: 'Consumer', ShipMode: 'First Class', Category: 'Office Supplies', Profit: 7734.74, Sales: 48200.43 },
40+
{ Segment: 'Corporate', ShipMode: 'First Class', Category: 'Office Supplies', Profit: 6299.74, Sales: 31579.43 },
41+
{ Segment: 'Home Office', ShipMode: 'First Class', Category: 'Office Supplies', Profit: 4366.74, Sales: 21552.43 },
42+
{ Segment: 'Consumer', ShipMode: 'First Class', Category: 'Furniture', Profit: 2078.74, Sales: 49880.43 },
43+
{ Segment: 'Corporate', ShipMode: 'First Class', Category: 'Furniture', Profit: 929.75, Sales: 35077.43 },
44+
{ Segment: 'Home Office', ShipMode: 'First Class', Category: 'Furniture', Profit: 58.74, Sales: 25773.43 },
45+
{ Segment: 'Consumer', ShipMode: 'Second Class', Category: 'Technology', Profit: 14430.75, Sales: 72942.43 },
46+
{ Segment: 'Corporate', ShipMode: 'Second Class', Category: 'Technology', Profit: 6819.74, Sales: 41912.43 },
47+
{ Segment: 'Home Office', ShipMode: 'Second Class', Category: 'Technology', Profit: 4902.75, Sales: 27366.43 },
48+
{ Segment: 'Consumer', ShipMode: 'Second Class', Category: 'Office Supplies', Profit: 9752.74, Sales: 71757.43 },
49+
{ Segment: 'Corporate', ShipMode: 'Second Class', Category: 'Office Supplies', Profit: 9809.74, Sales: 62810.43 },
50+
{ Segment: 'Home Office', ShipMode: 'Second Class', Category: 'Office Supplies', Profit: 7506.74, Sales: 26115.43 },
51+
{ Segment: 'Consumer', ShipMode: 'Second Class', Category: 'Furniture', Profit: 763.74, Sales: 86799.43 },
52+
{ Segment: 'Corporate', ShipMode: 'Second Class', Category: 'Furniture', Profit: 1596.74, Sales: 41403.43 },
53+
{ Segment: 'Home Office', ShipMode: 'Second Class', Category: 'Furniture', Profit: 1865.74, Sales: 28086.43 }
54+
]
55+
},
56+
vizlayout: {
57+
title: 'Example Combination Chart',
58+
size: { width: 800, height: 600 },
59+
showcolorlegend: true,
60+
showsizelegend: false,
61+
showrowsgridline: false
62+
},
63+
columns: [
64+
{ field: 'ShipMode', type: tableau.VizImageEncodingType.Discrete },
65+
{ field: 'Sales', type: tableau.VizImageEncodingType.Continuous },
66+
{ field: 'Profit', type: tableau.VizImageEncodingType.Continuous }
67+
],
68+
rows: [{ field: 'Segment', type: tableau.VizImageEncodingType.Discrete }],
69+
encodingaxis: 'columns',
70+
defaultencoding: { mark: tableau.MarkType.Bar },
71+
encodings: [
72+
{
73+
mark: markType1
5574
},
56-
vizlayout: {
57-
title: 'Example Combination Chart',
58-
size: {width: 800, height: 600},
59-
showcolorlegend: true,
60-
showsizelegend:false,
61-
showrowsgridline: false,
62-
},
63-
columns: [
64-
{ field: 'ShipMode', type: tableau.VizImageEncodingType.Discrete },
65-
{ field: 'Sales', type: tableau.VizImageEncodingType.Continuous },
66-
{ field: 'Profit', type: tableau.VizImageEncodingType.Continuous },
67-
],
68-
rows: [{ field: 'Segment', type: tableau.VizImageEncodingType.Discrete }],
69-
encodingaxis: 'columns',
70-
defaultencoding: { mark: tableau.MarkType.Bar },
71-
encodings: [
72-
{
73-
mark: markType1,
74-
},
75-
{
75+
{
7676
mark: markType2,
77-
color: { field: 'Category', type: tableau.VizImageEncodingType.Discrete, palette: { name: colorType } },
78-
},
79-
],
80-
};
77+
color: { field: 'Category', type: tableau.VizImageEncodingType.Discrete, palette: { name: colorType } }
78+
}
79+
]
80+
};
8181

8282
// defaulting values if null.
8383
if (markType1 === null) {
@@ -88,24 +88,24 @@
8888
}
8989
if (colorType === null) {
9090
vizInputSpec.colorType = 'tableau20_10_0';
91-
}
91+
}
9292

9393
// making call to create viz image from the input specifications.
9494
tableau.extensions.createVizImageAsync(vizInputSpec).then(function (svg) {
95-
var blob = new Blob([svg], { type: 'image/svg+xml' });
96-
var url = URL.createObjectURL(blob);
97-
var image = document.createElement('img');
95+
const blob = new Blob([svg], { type: 'image/svg+xml' });
96+
const url = URL.createObjectURL(blob);
97+
const image = document.createElement('img');
9898
image.src = url;
9999
image.style.maxWidth = '100%';
100100
image.style.maxHeight = '100%';
101101
image.className = 'center-block';
102-
var vizApiElement = document.getElementById('viz-container');
102+
const vizApiElement = document.getElementById('viz-container');
103103
// clearing UI and adding in new viz.
104104
vizApiElement.innerHTML = '';
105105
vizApiElement.appendChild(image);
106106
image.addEventListener('load', function () { return URL.revokeObjectURL(url); }, { once: true });
107107
}, function (err) {
108108
console.log(err);
109-
});
109+
});
110110
}
111111
})();

docs/assets/js/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)