Skip to content

Commit b495131

Browse files
committed
fix and 🔒 ternary showticklabels
1 parent 2a667d0 commit b495131

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

src/plots/ternary/ternary.js

+6
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ proto.adjustLayout = function(ternaryLayout, graphSize) {
254254
domain: [yDomain0, yDomain0 + yDomainFinal * w_over_h],
255255
_axislayer: _this.layers.aaxis,
256256
_gridlayer: _this.layers.agrid,
257+
anchor: 'free',
258+
position: 0,
257259
_pos: 0, // _this.xaxis.domain[0] * graphSize.w,
258260
_id: 'y',
259261
_length: w,
@@ -274,6 +276,8 @@ proto.adjustLayout = function(ternaryLayout, graphSize) {
274276
_axislayer: _this.layers.baxis,
275277
_gridlayer: _this.layers.bgrid,
276278
_counteraxis: _this.aaxis,
279+
anchor: 'free',
280+
position: 0,
277281
_pos: 0, // (1 - yDomain0) * graphSize.h,
278282
_id: 'x',
279283
_length: w,
@@ -296,6 +300,8 @@ proto.adjustLayout = function(ternaryLayout, graphSize) {
296300
_axislayer: _this.layers.caxis,
297301
_gridlayer: _this.layers.cgrid,
298302
_counteraxis: _this.baxis,
303+
anchor: 'free',
304+
position: 0,
299305
_pos: 0, // _this.xaxis.domain[1] * graphSize.w,
300306
_id: 'y',
301307
_length: w,
23.4 KB
Loading

test/image/mocks/ternary_noticks.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"data": [
3+
{
4+
"a": [2, 1, 1],
5+
"b": [1, 2, 1],
6+
"c": [1, 1, 2.12345],
7+
"type": "scatterternary"
8+
}
9+
],
10+
"layout": {
11+
"ternary": {
12+
"aaxis": {
13+
"showticklabels": false,
14+
"showline": false,
15+
"title": "no labels / no line"
16+
},
17+
"baxis": {
18+
"ticks": "",
19+
"showticklabels": false,
20+
"title": "no ticks / no labels"
21+
},
22+
"caxis": {
23+
"showticklabels": false,
24+
"showgrid": false,
25+
"title": "no grid / no labels"
26+
}
27+
},
28+
"height": 450,
29+
"width": 700
30+
}
31+
}

0 commit comments

Comments
 (0)