mirror of
https://github.com/apache/superset.git
synced 2026-05-06 16:34:32 +00:00
Allowing to define a default format string per-metric (#750)
This commit is contained in:
committed by
GitHub
parent
8312f1c2aa
commit
f034f2701e
@@ -2,6 +2,7 @@ var $ = require('jquery');
|
||||
var jQuery = $;
|
||||
var d3 = require('d3');
|
||||
var Mustache = require('mustache');
|
||||
var utils = require('./utils');
|
||||
|
||||
// vis sources
|
||||
var sourceMap = {
|
||||
@@ -240,6 +241,12 @@ var px = (function () {
|
||||
endpoint += "&force=" + this.force;
|
||||
return endpoint;
|
||||
},
|
||||
d3format: function (col, number) {
|
||||
// uses the utils memoized d3format function and formats based on
|
||||
// column level defined preferences
|
||||
var format = this.data.column_formats[col];
|
||||
return utils.d3format(format, number);
|
||||
},
|
||||
done: function (data) {
|
||||
clearInterval(timer);
|
||||
token.find("img.loading").hide();
|
||||
|
||||
Reference in New Issue
Block a user