From 920d378d71db5feb9c1f011e6e3074087c5e76a4 Mon Sep 17 00:00:00 2001 From: Masayuki Tanaka Date: Tue, 11 Aug 2015 17:54:15 +0100 Subject: [PATCH] Update bubble chart extension --- extensions/chart-bubble/bubble.js | 2 +- extensions/chart-bubble/index.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/chart-bubble/bubble.js b/extensions/chart-bubble/bubble.js index 8dfe607..959b4dc 100644 --- a/extensions/chart-bubble/bubble.js +++ b/extensions/chart-bubble/bubble.js @@ -49,7 +49,7 @@ } max = d3.max(Object.keys(values).map(function (key) { return values[key]; })); - min = d3.min(Object.keys(values).map(function (key) { return values[key]; })), + min = d3.min(Object.keys(values).map(function (key) { return values[key]; })) * 0.8, a = ((base_length / (names.length * 2)) - 1) / (Math.log(max + 1) - Math.log(min + 1)); value = !values[key] ? 0 : values[key]; diff --git a/extensions/chart-bubble/index.html b/extensions/chart-bubble/index.html index ede5f27..9ee7146 100644 --- a/extensions/chart-bubble/index.html +++ b/extensions/chart-bubble/index.html @@ -20,8 +20,8 @@ { x: 'Name_1', y: 'Name_1', value: 6000 }, { x: 'Name_1', y: 'Name_2', value: 50000 }, { x: 'Name_2', y: 'Name_0', value: 1000 }, - { x: 'Name_2', y: 'Name_1', value: 20000 }, - { x: 'Name_2', y: 'Name_2', value: 30000 }, + { x: 'Name_2', y: 'Name_1', value: 2000 }, + { x: 'Name_2', y: 'Name_2', value: 3000 }, ] }, grid: {