diff options
Diffstat (limited to 'src/third_party/wiredtiger/tools/wtstats/template/models/colors.js')
-rw-r--r-- | src/third_party/wiredtiger/tools/wtstats/template/models/colors.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/tools/wtstats/template/models/colors.js b/src/third_party/wiredtiger/tools/wtstats/template/models/colors.js new file mode 100644 index 00000000000..9b52ce9ef16 --- /dev/null +++ b/src/third_party/wiredtiger/tools/wtstats/template/models/colors.js @@ -0,0 +1,19 @@ +var d3 = require('d3'); + +var ColorSingleton = module.exports = (function () { + var instance; + + function createInstance() { + var object = d3.scale.category20(); + return object; + } + + return { + getInstance: function () { + if (!instance) { + instance = createInstance(); + } + return instance; + } + }; +})(); |