Skip to content

Commit

Permalink
sunburstclick transitions:
Browse files Browse the repository at this point in the history
- tweens sector paths and text 🎉
- first-cut Plotly.animate support
- calls Plotly.animate on sector click !
- disables sector clicks during transitions
- trigger plotly_click on root and leaf node
- clean up variable names and helpers, 1 routine to attach
  click and hover handlers !
  • Loading branch information
etpinard committed Mar 8, 2019
1 parent a3f1cf8 commit aa3adf3
Show file tree
Hide file tree
Showing 3 changed files with 537 additions and 170 deletions.
4 changes: 2 additions & 2 deletions src/traces/sunburst/base_plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ var getModuleCalcData = require('../../plots/get_data').getModuleCalcData;

var name = exports.name = 'sunburst';

exports.plot = function(gd) {
exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) {
var _module = Registry.getModule(name);
var cdmodule = getModuleCalcData(gd.calcdata, _module)[0];

if(cdmodule.length) {
_module.plot(gd, cdmodule);
_module.plot(gd, cdmodule, transitionOpts, makeOnCompleteCallback);
}
};

Expand Down
1 change: 1 addition & 0 deletions src/traces/sunburst/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
name: 'sunburst',
basePlotModule: require('./base_plot'),
categories: [],
animatable: true,

attributes: require('./attributes'),
layoutAttributes: require('./layout_attributes'),
Expand Down
Loading

0 comments on commit aa3adf3

Please sign in to comment.