mistercrunch commented on a change in pull request #3626: Set tooltip to show
extent of sparkData
URL:
https://github.com/apache/incubator-superset/pull/3626#discussion_r143626421
##########
File path: superset/assets/visualizations/time_table.jsx
##########
@@ -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));
Review comment:
I feel like we shouldn't round here, instead change the number formatting
when assembling the tooltip
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services