Skip to content

Commit

Permalink
Set tooltip to show extent of sparkData
Browse files Browse the repository at this point in the history
  • Loading branch information
michellethomas committed Oct 9, 2017
1 parent 912c6f6 commit a63e5c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/assets/visualizations/time_table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ function viz(slice, payload) {
// Period ratio sparkline
sparkData = [];
for (let i = c.timeRatio; i < data.length; i++) {
sparkData.push(data[i][metric] / data[i - c.timeRatio][metric]);
sparkData.push(d3.round(data[i][metric] / data[i - c.timeRatio][metric], 2));
}
}
const extent = d3.extent(data, d => d[metric]);
const extent = d3.extent(sparkData);
const tooltip = `min: ${extent[0]}, max: ${extent[1]}`;
row[c.key] = (
<TooltipWrapper label="tt-spark" tooltip={tooltip}>
Expand Down

0 comments on commit a63e5c4

Please sign in to comment.