Skip to content

Commit

Permalink
fix(tooltip): fix to be multiline instead of multitooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
scottdickerson committed Oct 17, 2019
1 parent 94c5bda commit 0f90325
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/components/essentials/tooltip-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class TooltipBar extends Tooltip {
} else {
if (e.detail.multidata) {
// multi tooltip
tooltipTextContainer.html(this.getMultiTooltipHTML(e.detail.multidata));
tooltipTextContainer.html(this.getMultilineTooltipHTML(e.detail.multidata));
// Position the tooltip
this.positionTooltip();
} else {
Expand Down Expand Up @@ -104,7 +104,7 @@ export class TooltipBar extends Tooltip {
* Multip tooltips for bar charts include totals for each stack
* @param data
*/
getMultiTooltipHTML(data: any) {
getMultilineTooltipHTML(data: any) {
const points = data;

points.reverse();
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/essentials/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class Tooltip extends Component {
} else if (e.detail.multidata) {
// multi tooltip
data = e.detail.multidata;
tooltipTextContainer.html(this.getMultiTooltipHTML(data));
tooltipTextContainer.html(this.getMultilineTooltipHTML(data));
} else {
tooltipTextContainer.html(this.getTooltipHTML(data));
}
Expand Down Expand Up @@ -80,7 +80,7 @@ export class Tooltip extends Component {
<p class="value">${formattedValue}</p></div>`;
}

getMultiTooltipHTML(data: any) {
getMultilineTooltipHTML(data: any) {
const points = data;

// sort them so they are in the same order as the graph
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/tests/test-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const data = {

export const options = {
accessibility: false,
animation: false,
axes: {
bottom: {
title: "2018 Annual Sales Figures",
Expand Down

0 comments on commit 0f90325

Please sign in to comment.