diff --git a/src/plot_api/plot_api.js b/src/plot_api/plot_api.js index d43276ff186..9b7acb1af60 100644 --- a/src/plot_api/plot_api.js +++ b/src/plot_api/plot_api.js @@ -1575,6 +1575,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) { 'mode','visible','type','orientation','fill', 'histfunc','histnorm','text', 'x', 'y', 'z', + 'a', 'b', 'c', 'xtype','x0','dx','ytype','y0','dy','xaxis','yaxis', 'line.width', 'connectgaps', 'transpose', 'zsmooth', diff --git a/test/jasmine/tests/ternary_test.js b/test/jasmine/tests/ternary_test.js index b933dae528c..b7ac57b640b 100644 --- a/test/jasmine/tests/ternary_test.js +++ b/test/jasmine/tests/ternary_test.js @@ -88,6 +88,22 @@ describe('ternary plots', function() { }); }); + it('should be able to restyle', function(done) { + Plotly.restyle(gd, { a: [[1,2,3]]}, 0).then(function() { + var transforms = []; + d3.selectAll('.ternary .point').each(function() { + var point = d3.select(this); + transforms.push(point.attr('transform')); + }); + + expect(transforms).toEqual([ + 'translate(186.45,209.8)', + 'translate(118.53,170.59)', + 'translate(248.76,117.69)' + ]); + }).then(done); + }); + it('should display to hover labels', function() { var hoverLabels; @@ -180,7 +196,6 @@ describe('ternary plots', function() { done(); }); }); - }); function countTernarySubplot() {