Skip to content
This repository was archived by the owner on May 2, 2022. It is now read-only.

Commit b8b4cd1

Browse files
committed
Merge branch 'release/v1.3.1'
2 parents cf44a81 + b78d08f commit b8b4cd1

File tree

86 files changed

+21263
-1277
lines changed

Some content is hidden

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

86 files changed

+21263
-1277
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ canvas
127127
.mount("#chart"); // Specify an element to mount on using a CSS selector
128128
```
129129

130-
See [muzejs.org/docs](https://muzejs.org/docs) for more documentation!
130+
See [muzejs.org/docs](https://muzejs.org/docs/v1.3.1) for more documentation!
131131

132132
You also can checkout our Yeoman Generator [generator-muze](https://github.com/chartshq/generator-muze) to try out the **muze** through a boilerplate app.
133133

134134
## Documentation
135135

136-
You can find detailed tutorials, concepts and API references at [muzejs.org/docs](https://muzejs.org/docs).
136+
You can find detailed tutorials, concepts and API references at [muzejs.org/docs](https://muzejs.org/docs/v1.3.1).
137137

138138
## Support
139139

bitbucket-pipelines.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
image: node:10.16.3
2-
2+
options:
3+
max-time: 30
34
pipelines:
45
pull-requests:
56
'**':
@@ -9,4 +10,4 @@ pipelines:
910
- apt-get install zip
1011
- npm install --unsafe-perm
1112
- npm run test
12-
- npm run autotest:prod
13+
- npm run autotest:prod

dist/muze.css

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

dist/muze.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.

dist/muze.js.map

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

examples/index.html

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,16 @@
99
<!-- <link rel="stylesheet" href="./muze.css" /> -->
1010
<script src="/muze.js"></script>
1111
<style>
12-
body,
13-
html {
14-
font-family: 'Source Sans Pro', "Helvetica Neue", Helvetica, Arial, sans-serif;
15-
}
16-
17-
#chart-container {
12+
#chart {
13+
/* width: 800px; */
14+
/* height: 550px; */
1815
overflow-y: auto !important;
1916
text-align: center;
2017
padding: 0px 10px 10px 10px;
2118
height: auto;
22-
min-height: 350px;
23-
}
24-
25-
.averageLine path {
26-
stroke-width: 2px;
2719
}
28-
#chart{
29-
/* position: absolute;
30-
left:50px;
31-
top:50px; */
20+
.muze-grid-td-id-15795913960365158 {
21+
border-color: brown !important;
3222
}
3323
</style>
3424
</head>
@@ -47,20 +37,7 @@
4737
<div id="chart7"></div>
4838
<div id="chart8"></div>
4939
</div>
50-
<!-- <script src="./js/simple-bar.js"></script> -->
51-
<script src="./samples/design-samples/scatter-shape.js"></script>
52-
53-
<!-- <script src="./js/tooltips/area.js"></script> -->
54-
<!-- <script src="./js/simple-bar.js"></script> -->
55-
<!-- <script src="./samples/design-samples/scatter-shape.js"></script> -->
56-
<!-- <script src="./js/aaa1.js"></script> -->
57-
<!-- <script src="./js/aaa3.js"></script> -->
58-
<!-- <script src="./js/aaa2.js"></script> -->
59-
<!-- <script src="./js/composite-layers.js"></script> -->
60-
<!-- <script src="./js/composition-of-layer.js"></script> -->
61-
<!-- <script src="./js/reference-lines.js"></script> -->
62-
<!-- <script src="./js/dual-line-point.js"></script> -->
63-
<!-- <script src="./js/no-data.js"></script> -->
64-
<!-- <script src="./js/concurrent-tooltip.js"></script> -->
40+
<script src="./js/legends/gradient.js"></script>
6541
</body>
42+
6643
</html>

examples/index1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<script src="./js/d3.js"></script>
2222
<!-- <script src="./js/sample3.js"></script> -->
2323
<!-- <script src="./js/crosstab-sorted.js"></script> -->
24-
<script src="./js/bubble-temporal.js"></script>
24+
<script src="./samples/design-samples/scatter-shape.js"></script>
2525
</body>
2626

2727
</html>

examples/js/aa.js

Lines changed: 25 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,34 @@
44
let env = window.muze();
55
const DataModel = window.muze.DataModel;
66

7-
d3.csv('/data/weather.csv', (data) => {
8-
const share = muze.Operators.share;
7+
d3.csv('/data/austin-weather.csv', (data) => {
98
const schema = [{
10-
name: 'maxDays',
11-
type: 'measure'
9+
name: 'Date',
10+
type: 'dimension'
1211
}, {
13-
name: 'minDays',
12+
name: 'Events',
13+
type: 'dimension'
14+
},{
15+
name: 'DewPointHighF',
1416
type: 'measure'
15-
}, {
16-
name: 'time',
17-
type: 'dimension',
1817
}];
19-
20-
let rootData = new DataModel(data, schema)
21-
22-
rootData = rootData.calculateVariable({
23-
name: "date",
24-
type: "dimension",
25-
subtype: "temporal",
26-
format: "%Y-%m-%d"
27-
}, ["Year", function (d) {
28-
return d;
18+
let dm = new DataModel(data, schema);
19+
dm = dm.calculateVariable({
20+
name: 'Year',
21+
type: 'dimension'
22+
}, ['Date', (y) => {
23+
const date = new Date(y);
24+
return date.getFullYear();
2925
}]);
30-
31-
env = env.data(rootData).minUnitHeight(40).minUnitWidth(40);
32-
var mountPoint = document.getElementById('chart');
33-
window.canvas = env.canvas();
34-
var rows = ['Cylinders', 'Horsepower'],
35-
columns = ['Origin', 'Year'];
36-
canvas = canvas.rows(rows).columns(columns).height(800).color('Origin')
37-
//{initProps}
38-
.mount(mountPoint);
39-
40-
setTimeout(() => {
41-
canvas.rows(['Horsepower', 'Acceleration']).columns(['Acceleration', 'Horsepower']).color('Horsepower').size('Cylinders').detail(['Maker']).width(300).height(300);
42-
canvas.once('canvas.animationend').then(function (client) {
43-
var element = document.getElementById('chart');
44-
element.classList.add('animateon');
45-
});
46-
}, 3000);
47-
48-
// const canvas = env.canvas();
26+
// dm = dm.select((fields) => !!fields.Events.value)
27+
const canvas = env.canvas();
4928

50-
// canvas
51-
// .data(rootData)
52-
// // .rows(['maxDays'])
53-
// .rows([share('maxDays', 'minDays')])
54-
// .columns(['time'])
55-
// .layers([{ mark: 'tick', encoding: { y: 'maxDays', y0: 'minDays' } } ])
56-
// // .layers([{
57-
// // mark: 'area'
58-
// // }])
59-
// // .detail(['Name'])
60-
// .mount('#chart')
61-
// .height(500)
62-
// .width(900)
63-
// .title('Charts');
64-
})
65-
})();
29+
canvas
30+
.columns(['Year', 'Events'])
31+
.rows(['DewPointHighF'])
32+
.width(1000)
33+
.height(400)
34+
.data(dm)
35+
.mount('#chart')
36+
});
37+
})();

examples/js/legends/gradient.js

Lines changed: 45 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -10,71 +10,71 @@ d3.json('../data/cars.json', function (data) {
1010

1111
schema = [{
1212

13-
name: 'Name',
13+
name: 'Name',
1414

15-
type: 'dimension'
15+
type: 'dimension'
1616

17-
}, {
17+
}, {
1818

19-
name: 'Maker',
19+
name: 'Maker',
2020

21-
type: 'dimension'
21+
type: 'dimension'
2222

23-
}, {
23+
}, {
2424

25-
name: 'Miles_per_Gallon',
25+
name: 'Miles_per_Gallon',
2626

27-
type: 'measure'
27+
type: 'measure'
2828

29-
}, {
29+
}, {
3030

31-
name: 'Displacement',
31+
name: 'Displacement',
3232

33-
type: 'measure'
33+
type: 'measure'
3434

35-
}, {
35+
}, {
3636

37-
name: 'Horsepower',
37+
name: 'Horsepower',
3838

39-
type: 'measure'
39+
type: 'measure'
4040

41-
}, {
41+
}, {
4242

43-
name: 'Weight_in_lbs',
43+
name: 'Weight_in_lbs',
4444

45-
type: 'measure'
45+
type: 'measure'
4646

47-
}, {
47+
}, {
4848

49-
name: 'Acceleration',
49+
name: 'Acceleration',
5050

51-
type: 'measure'
51+
type: 'measure'
5252

53-
}, {
53+
}, {
5454

55-
name: 'Origin',
55+
name: 'Origin',
5656

57-
type: 'dimension'
57+
type: 'dimension'
5858

59-
}, {
59+
}, {
6060

61-
name: 'Cylinders',
61+
name: 'Cylinders',
6262

63-
type: 'dimension'
63+
type: 'dimension'
6464

65-
}, {
65+
}, {
6666

67-
name: 'Year',
67+
name: 'Year',
6868

69-
type: 'dimension',
69+
type: 'dimension',
7070

71-
//{subtype}
71+
//{subtype}
7272

73-
// subtype: 'temporal',
73+
// subtype: 'temporal',
7474

75-
// format: '%Y-%m-%d'
75+
// format: '%Y-%m-%d'
7676

77-
}];
77+
}];
7878

7979
var rootData = new DataModel(jsonData, schema);
8080

@@ -93,25 +93,18 @@ d3.json('../data/cars.json', function (data) {
9393
})
9494
.config({
9595
legend: {
96-
position: 'bottom'
96+
position: 'bottom',
97+
color: {
98+
marker: {
99+
text: {
100+
formatter: (data, domain, dm) => {
101+
return `${data} m/s2`;
102+
}
103+
}
104+
},
105+
106+
}
97107
}
98108
})
99-
.mount('#chart1')
100-
101-
env.canvas()
102-
.rows(["Maker"])
103-
.height(400)
104-
.columns(['Acceleration'])
105-
.data(rootData)
106-
.color({
107-
field: 'Acceleration',
108-
stops: 3
109-
})
110-
.config({
111-
legend: {
112-
position: 'left'
113-
}
114-
})
115-
.mount('#chart2')
116-
109+
.mount('#chart1');
117110
});

examples/js/tooltips/crosstab.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,25 @@ d3.csv('../../data/coffee.csv', (data) => {
5757
},
5858
facetConfig: { rows: { verticalAlign: 'bottom' } }, /* dimensional values are placed in middle */
5959
border:{
60+
color:'blue',
6061
showRowBorders: {
6162
top: true,
6263
bottom: true,
64+
left: true,
65+
right: true
66+
},
67+
showValueBorders:{
68+
top: false,
69+
bottom: true,
70+
left: true,
71+
right: true
6372
},
6473
showColBorders:{
65-
left: true,
66-
right: true
74+
top: true,
75+
bottom: true,
76+
left: true,
77+
right: true
6778
},
68-
showValueBorders: {
69-
top: true,
70-
bottom: true,
71-
left: true,
72-
right: true
73-
}
7479
},
7580
})
7681
.title('Visual Crosstab')

0 commit comments

Comments
 (0)