Skip to content

Commit

Permalink
fix default sunburst tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
bmesuere committed Aug 30, 2017
1 parent 3b89e8a commit 1be7e99
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 80 deletions.
76 changes: 40 additions & 36 deletions dist/unipept-visualizations.es5.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/unipept-visualizations.es5.js.map

Large diffs are not rendered by default.

76 changes: 40 additions & 36 deletions dist/unipept-visualizations.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/unipept-visualizations.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/unipept-visualizations.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/sunburst/sunburst.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class Sunburst {
constructor(element, data, options = {}) {
this.element = element;
this.data = data;
this.settings = Object.assign({}, Sunburst.DEFAULTS, options);
this.settings = Object.assign({}, this.DEFAULTS, options);

this.settings.width = this.settings.width - Sunburst.MARGIN.right - Sunburst.MARGIN.left;
this.settings.height = this.settings.height - Sunburst.MARGIN.top - Sunburst.MARGIN.bottom;
Expand Down Expand Up @@ -427,7 +427,7 @@ export default class Sunburst {
return ["#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5", "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", "#637939", "#8ca252", "#b5cf6b", "#cedb9c", "#8c6d31", "#bd9e39", "#e7ba52", "#e7cb94", "#843c39", "#ad494a", "#d6616b", "#e7969c", "#7b4173", "#a55194", "#ce6dbd", "#de9ed6", "#3182bd", "#6baed6", "#9ecae1", "#c6dbef", "#e6550d", "#fd8d3c", "#fdae6b", "#fdd0a2", "#31a354", "#74c476", "#a1d99b", "#c7e9c0", "#756bb1", "#9e9ac8", "#bcbddc", "#dadaeb", "#636363", "#969696", "#bdbdbd", "#d9d9d9"];
}

static get DEFAULTS() {
get DEFAULTS() {
return {
height: 600,
width: 600,
Expand All @@ -449,7 +449,7 @@ export default class Sunburst {
getLabel: d => d.name === "empty" ? "" : d.name,

enableTooltips: true,
getTooltip: this.getTooltip,
getTooltip: d => this.getTooltip.call(this, d),
getTooltipTitle: Univis.getTooltipTitle,
getTooltipText: Univis.getTooltipText,
};
Expand Down

0 comments on commit 1be7e99

Please sign in to comment.