Browse Source

Update bubble chart extension

pull/1177/merge
Masayuki Tanaka 10 years ago
parent
commit
920d378d71
  1. 2
      extensions/chart-bubble/bubble.js
  2. 4
      extensions/chart-bubble/index.html

2
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];

4
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: {

Loading…
Cancel
Save