You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ap...@apache.org on 2018/12/03 21:03:39 UTC

[incubator-pinot] branch master updated: Applied humanizeFloat to anomaly-graph component (#3577)

This is an automated email from the ASF dual-hosted git repository.

apucher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new a4505af  Applied humanizeFloat to anomaly-graph component (#3577)
a4505af is described below

commit a4505af18150e4f5edf67c07fb13ccbc9066eda9
Author: Harley Jackson <ha...@gmail.com>
AuthorDate: Mon Dec 3 13:03:33 2018 -0800

    Applied humanizeFloat to anomaly-graph component (#3577)
---
 .../app/pods/components/anomaly-graph/component.js           | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/thirdeye/thirdeye-frontend/app/pods/components/anomaly-graph/component.js b/thirdeye/thirdeye-frontend/app/pods/components/anomaly-graph/component.js
index 6218f6a..396d001 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/anomaly-graph/component.js
+++ b/thirdeye/thirdeye-frontend/app/pods/components/anomaly-graph/component.js
@@ -4,6 +4,7 @@ import { later } from '@ember/runloop';
 import Component from '@ember/component';
 import moment from 'moment';
 import d3 from 'd3';
+import { humanizeFloat } from 'thirdeye-frontend/utils/utils';
 
 const COLOR_MAPPING = {
   blue: '#33AADA',
@@ -185,7 +186,7 @@ export default Component.extend({
           .attr('y1', 10)
           .attr('x2', 30)
           .attr('y2', 10)
-          .attr('stroke-dasharray', (d) => {
+          .attr('stroke-dasharray', () => {
             const dasharrayNum = 'none';
             return dasharrayNum;
           });
@@ -385,7 +386,6 @@ export default Component.extend({
    * Graph Legend config
    */
   legend: computed('showGraphLegend', function() {
-    const showGraphLegend = this.get('showGraphLegend');
     return {
       position: 'inset',
       show: false
@@ -459,7 +459,7 @@ export default Component.extend({
           show: true,
           // min: 0,
           tick: {
-            format: d3.format('.2s')
+            format: function(d){return humanizeFloat(d);}
           }
         },
         y2: {
@@ -559,7 +559,7 @@ export default Component.extend({
 
       // Return data only when it's selected
       if (primaryMetric.isSelected) {
-        const { baselineValues, currentValues } = primaryMetric.subDimensionContributionMap['All'];
+        const { currentValues } = primaryMetric.subDimensionContributionMap['All'];
         return [
           [`${primaryMetric.metricName}-current`, ...currentValues]
         ];
@@ -583,7 +583,7 @@ export default Component.extend({
       selectedMetrics.forEach((metric)  => {
         if (!metric) { return; }
 
-        const { baselineValues, currentValues } = metric.subDimensionContributionMap['All'];
+        const { currentValues } = metric.subDimensionContributionMap['All'];
         columns.push([`${metric.metricName}-current`, ...currentValues]);
       });
       return columns;
@@ -600,7 +600,7 @@ export default Component.extend({
       const selectedDimensions = this.get('selectedDimensions') || [];
 
       selectedDimensions.forEach((dimension) => {
-        const { baselineValues, currentValues } = dimension;
+        const { currentValues } = dimension;
         columns.push([`${dimension.name}-current`, ...currentValues]);
       });
       return columns;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org